Skip to content

rojanjn/Java-Student-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Student Tracker


Overview

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.


Classes & Responsibilities

Address

  • Stores student’s address:
    • streetInfo, city, postalCode, province, country.
  • Aggregated inside Student.

Student (Base Class)

  • Fields: studentID, stdFirstName, stdLastName, stdMarks[], stdAddress.
  • Methods:
    • Average() → calculates average of student’s marks.
    • Graduate() → default false, overridden by subclasses.
    • toString() → returns student info.

UndergraduateStudent (Subclass)

  • Extra fields: subject, yearOfEntry.
  • Overrides:
    • Graduate()true if Average() > 50.

GraduateStudent (Subclass)

  • Extra fields: subject, yearOfEntry, thesisTopic.
  • Overrides:
    • Graduate()true if Average() > 70.

Main

Implements the console menu system:

  1. Add Undergraduate Student
  2. Add Graduate Student
  3. View All Students
  4. View Eligible Students for Graduation
  5. Exit

How to Run

Clone the repository

git clone https://github.com/<your-username>/COMP2130-Assignment1.git
cd COMP2130-Assignment1
javac -d out *.java
java -cp out Main

Example Run

===== 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

About

A Java console application that manages undergraduate and graduate students with OOP concepts like inheritance and aggregation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages