A. Requirement #1: Add Students Information Add information for the students all
ID: 3700804 • Letter: A
Question
A. Requirement #1: Add Students Information Add information for the students allowed to access the system. Each student has Login_ld and a Password. Also add 2 courses per student to simulate the registration. Maximum number of students in the system is 10. You need to store all information in a file then use it to instantiate the right objects. B. Requirement #2: Students Authentication A student will be asked to provide Login_Id and Password to access the system. Login process should verify the Login_id and password. A student should have a name, ID, and email address. C. Requirement #3: Display Courses for each Student The system will display the courses registered by the student in the current semester. Maximum courses is 2 per semester. Each course should have at least a course number, name, and schedule (date and time). D. Requirements #4: Calculate and Display the Marks for each Course A student can check the marks of his assignments. Maximum number of assignments is 3 per semester. You also need to display the total out of 100. E. Requirements #5: Display Instructor Information Each course is taught by an Instructor. Display the course instructor's information for each course. Instructor information include name, ID, email address. An instructor cannot teach more than two courses per semester.Explanation / Answer
In 1 question you have so many problems,it will be difficult for me to provide running code for so many problems in single one question.
I am giving working code for 1 problem ,kindly ask different question fo other problems.Hope you unserstand it.
Solution to problem 1:-
import java.io.*;
import java.util.Scanner;
class studentDetails {
public String name[][] = new String[10][10];
void getDetails(int n)
{
Scanner get = new Scanner(System.in);
int limit=n;
System.out.println("Enter "+limit+" Student Details ");
for(int i=0;i<limit;i++)
{
System.out.println("Enter Student #"+(i+1)+" Login_ID, Password & 2 subjects name:");
for(int j=0;j<4;j++)
{
name[i][j] = get.nextLine();
}
}
display(limit);
}
void display(int limit)
{
System.out.println("Student Lgin Id"+" "+"Password"+" "+"Subject1"+" "+"Subject2");
for(int i=0;i<limit;i++)
{
for(int j=0;j<4;j++)
{
System.out.print(name[i][j]+" ");
}
System.out.println();
}
}
}
class collegeOffice {
public static void main(String args[]) throws IOException
{
Scanner in = new Scanner(System.in);
System.out.print("Enter Number of Students:");
int n = in.nextInt();
studentDetails std = new studentDetails();
std.getDetails(n);
PrintStream output = new PrintStream(new File("StudentDetails.txt"));
output.println("Student Lgin Id"+" "+"Password"+" "+"Subject1"+" "+"Subject2");
output.println("======================================");
for(int i=0;i<n;i++)
{
for(int j=0;j<4;j++)
{
output.print(std.name[i][j]+" ");
}
output.println();
output.println("======================================");
}
output.close();
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.