This project is a menu-driven Java console program that simulates a simple University Student Database.
It demonstrates key OOP concepts:
- Classes & Objects
- Inheritance
- Aggregation
- Array of Objects / ArrayList
The system allows the user to manage both Undergraduate and Graduate students, store their data, and check their graduation eligibility.
- Stores student’s address:
streetInfo,city,postalCode,province,country.
- Aggregated inside
Student.
- Fields:
studentID,stdFirstName,stdLastName,stdMarks[],stdAddress. - Methods:
Average()→ calculates average of student’s marks.Graduate()→ defaultfalse, overridden by subclasses.toString()→ returns student info.
- Extra fields:
subject,yearOfEntry. - Overrides:
Graduate()→trueifAverage() > 50.
- Extra fields:
subject,yearOfEntry,thesisTopic. - Overrides:
Graduate()→trueifAverage() > 70.
Implements the console menu system:
- Add Undergraduate Student
- Add Graduate Student
- View All Students
- View Eligible Students for Graduation
- Exit
git clone https://github.com/<your-username>/COMP2130-Assignment1.git
cd COMP2130-Assignment1
javac -d out *.java
java -cp out Main===== Student Management System =====
1. Add Undergraduate Student
2. Add Graduate Student
3. View All Students
4. View Eligible Students for Graduation
5. Exit
Enter choice: 1
Enter Student ID: 1001
Enter First Name: Rojan
Enter Last Name: Jafarnezhad
Enter number of marks: 3
Enter mark 1: 60
Enter mark 2: 70
Enter mark 3: 80
Enter Subject: Computer Science
Enter Year of Entry: 2022
Enter Address Info
Street: 123 Main St
City: Toronto
Postal Code: A1B2C3
Province: ON
Country: Canada