OOP Java Practical Assignment
OOP Java Practical Assignment
You have been assigned the task of developing a Student Management System for a university. The system
should be capable of handling students, instructors, and courses. Your implementation should incorporate
the four main pillars of Object-Oriented Programming (OOP) - encapsulation, inheritance, polymorphism,
and abstraction.
Requirements:
1. Students:
• Each student should have a unique ID, name, and age.
• Students can enroll in multiple courses.
• Students can view their enrolled courses and grades.
2. Instructors:
• Each instructor should have a unique ID, name, and age.
• Instructors can teach multiple courses.
• Instructors can view the list of students enrolled in their courses.
3. Courses:
• Each course should have a unique course code, name, and instructor.
• Courses can have multiple students enrolled.
• Courses should be able to calculate and display average grades.
Your Task:
Student class:
Instructor class:
Course class:
• Attributes: courseCode (String), name (String), instructor (Instructor), enrolledStudents
(List<Student>), grades (List<Integer>)
• Constructor: Course(courseCode, name, instructor)
• Methods:
➢ addStudent(Student student): Adds the given student to the enrolledStudents list.
➢ setInstructor(Instructor instructor): Sets the instructor for the course.
➢ addGrade(Student student, int grade): Assigns the given grade to the specified student for the
course.
➢ getGrade(Student student): Retrieves the grade of the specified student for the course.
➢ calculateAverageGrade(): Calculates and returns the average grade for the course.
(2) Create a class called StudentManagementSystem. In this class, create objects of students, instructors,
and courses to demonstrate the functionality of your system. Show how polymorphism can be used to
handle different types of objects (students and instructors) through a common interface or base class.
(3) Implement a menu-driven interface in the StudentManagementSystem class that allows the user to
perform the following actions:
You can add additional features or functionalities to enhance the system if you wish.
Note: Ensure that your code is well-organized, documented and must follows best practices, and includes
appropriate comments for clarity.
Submission:
This work should be submitted before midnight (23:59), 10th June 2023 through my email:
soler.deus@yahoo.com and any late submission will NOT be entertained. Failure to submit on time will
reward a 0 of 100 to an individual without any questions asked. You should compress your files using either
zip or rar formats.