Project requirements:
• Load a list of available courses from the text file “courses.txt” (file is given) into an ArrayList. File format is as follows:
311224 1700 Object Oriented Programming
Where: 311224 is course No, 1700 is course price, and “Object Oriented Programming” is course Name.
• Load a list of students from the text file “students.txt” (file is given) into an ArrayList. File format is as follows:
Ali Ahmad 1/1/1980 200410123 IS
Where: Ali is first name, Ahmad is second name, 1/1/1980 is birth date, 200410123 is student ID and IS is the major.
• Display the following menu:
1 - Select a student.
2 - List all students
3 - List all students and registered courses
0 - Exit
Select one of the above numbers(0-3):
• When 1 is selected, list all students and ask user to select one.
• When a student is selected, display the following menu:
1 - Add a course
2 - drop a course
3 - List student’s registered courses
0 - Return to main menu
Select one of the above numbers(0-3):
The above commands act on the selected student.
See the program RUN below and let your program work like it.
Important Notes:
- Your program must use one inheritance and at least 4 classes (Student, Course,
FileReader, Test class and one class to inherit from).
- Use the LogFileReader of the weblog-analyzer project and customize it as needed to
read courses and student files.
- Make sure you have a class named Test. Also, make sure you write a main() method
inside it. I am going to compile and run this class only.
- Your program must accept input and display output exactly as shown in the
program run below. Same sequence is required. I am going to use automated
input to test your program. If your program fails the automated test
Use this main function in your Test class:
public static void main( String [] arg )
{
Test t = new Test();
t.start();
}
Below is a program run. Make sure your program runs exactly like this:
C: \hassan> java Test
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 1
1 ali ahmad 1/1/1980 200410123 IS
2 salem awad 5/12/1970 200010234 CS
3 tamer mohsen 4/10/1985 200610234 CE
Select one of the above numbers(1-3): 1
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 1
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
4 300600 Translation 1200.0
Select one of the above numbers(1-4): 1
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 1
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
4 300600 Translation 1200.0
Select one of the above numbers(1-4): 2
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 1
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
4 300600 Translation 1200.0
Select one of the above numbers(1-4): 3
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 2
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
Select one of the above numbers(1-3): 2
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 3
1 311224 Object Oriented Programming 1700.0
2 400230 Arabic Language 1000.0
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 0
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 2
1 ali ahmad 1/1/1980 200410123 IS
2 salem awad 5/12/1970 200010234 CS
3 tamer mohsen 4/10/1985 200610234 CE
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 3
ali ahmad 1/1/1980 200410123 IS
1 311224 Object Oriented Programming 1700.0
2 400230 Arabic Language 1000.0
salem awad 5/12/1970 200010234 CS
No registered courses
tamer mohsen 4/10/1985 200610234 CE
No registered courses
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 0
C: \hassan>
• Load a list of available courses from the text file “courses.txt” (file is given) into an ArrayList. File format is as follows:
311224 1700 Object Oriented Programming
Where: 311224 is course No, 1700 is course price, and “Object Oriented Programming” is course Name.
• Load a list of students from the text file “students.txt” (file is given) into an ArrayList. File format is as follows:
Ali Ahmad 1/1/1980 200410123 IS
Where: Ali is first name, Ahmad is second name, 1/1/1980 is birth date, 200410123 is student ID and IS is the major.
• Display the following menu:
1 - Select a student.
2 - List all students
3 - List all students and registered courses
0 - Exit
Select one of the above numbers(0-3):
• When 1 is selected, list all students and ask user to select one.
• When a student is selected, display the following menu:
1 - Add a course
2 - drop a course
3 - List student’s registered courses
0 - Return to main menu
Select one of the above numbers(0-3):
The above commands act on the selected student.
See the program RUN below and let your program work like it.
Important Notes:
- Your program must use one inheritance and at least 4 classes (Student, Course,
FileReader, Test class and one class to inherit from).
- Use the LogFileReader of the weblog-analyzer project and customize it as needed to
read courses and student files.
- Make sure you have a class named Test. Also, make sure you write a main() method
inside it. I am going to compile and run this class only.
- Your program must accept input and display output exactly as shown in the
program run below. Same sequence is required. I am going to use automated
input to test your program. If your program fails the automated test
Use this main function in your Test class:
public static void main( String [] arg )
{
Test t = new Test();
t.start();
}
Below is a program run. Make sure your program runs exactly like this:
C: \hassan> java Test
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 1
1 ali ahmad 1/1/1980 200410123 IS
2 salem awad 5/12/1970 200010234 CS
3 tamer mohsen 4/10/1985 200610234 CE
Select one of the above numbers(1-3): 1
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 1
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
4 300600 Translation 1200.0
Select one of the above numbers(1-4): 1
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 1
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
4 300600 Translation 1200.0
Select one of the above numbers(1-4): 2
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 1
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
4 300600 Translation 1200.0
Select one of the above numbers(1-4): 3
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 2
1 311224 Object Oriented Programming 1700.0
2 310120 PC Applications 1500.0
3 400230 Arabic Language 1000.0
Select one of the above numbers(1-3): 2
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 3
1 311224 Object Oriented Programming 1700.0
2 400230 Arabic Language 1000.0
1 - Add a course
2 - drop a course
3 - List student's registered courses
0 - Return to main menu
Select one of the above numbers(0-3): 0
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 2
1 ali ahmad 1/1/1980 200410123 IS
2 salem awad 5/12/1970 200010234 CS
3 tamer mohsen 4/10/1985 200610234 CE
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 3
ali ahmad 1/1/1980 200410123 IS
1 311224 Object Oriented Programming 1700.0
2 400230 Arabic Language 1000.0
salem awad 5/12/1970 200010234 CS
No registered courses
tamer mohsen 4/10/1985 200610234 CE
No registered courses
1 - Select a student.
2 - List all students
3 - List all students & registered courses
0 - Exit
Select one of the above numbers(0-3): 0
C: \hassan>