Question: 1 . Class Design Create the following classes, one for each CSV file: Student, Teacher, Course, Department Define shared properties ( e . g .
Class Design
Create the following classes, one for each CSV file:
Student, Teacher, Course, Department
Define shared properties eg id name in an abstract class and include common methods for all entities.
Use an interface to define shared behaviors eg displayInfo method to print details for any entity
FileReader Class
Implement a FileReader class with methods to read CSV files and return ArrayList objects:
loadStudentsString fileName: Reads students.csv and returns ArrayList.loadTeachersString fileName: Reads teachers.csv and returns ArrayList.loadCoursesString fileName: Reads courses.csv and returns ArrayList.loadDepartmentsString fileName: Reads departments.csv and returns ArrayList.
Error Handling:
Handle file IO errors and invalid data formats using exception handling.
SchoolManagementSystem Class
Create a SchoolManagementSystem class with methods to answer the following questions:
Department with Maximum Students: Print the department name with the most students.Teacher Advising Minimum Students: Print the name of the teacher advising the fewest students.Department Chairs: Print the names of department chairs.Students Missing Nationality: Count and print the number of students with missing nationality.Course Instructors: Print the name of the instructor for each course.
Error Handling:
Implement custom exceptions for scenarios such as missing instructor IDs, missing department IDs, or incomplete data.Handle exceptions gracefully within the SchoolManagementSystem class.
Testing
Create a TestSchoolManagementSystem class with a main method to:
Test all functionalities of the SchoolManagementSystem class.Display answers to the questions from the previous section eg "Department with Maximum Students", "Teacher Advising Minimum Students", etc.
Deliverables:
Use proper ObjectOriented Programming OOP principles:
Abstract classesInterfacesEncapsulation and inheritance
Demonstrate file reading and parsing to populate ArrayList objects for each class.
Implement robust error management with exception handling.
Develop a main class to test and display results for all questions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
