Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Design a Course class with id and name ( both String type ) with a constructor that takes all the data fields as arguments. A
Design a Course class with id and name both String type with a constructor that takes all the data fields as arguments. A course id is fixed in length whereas the course name may change in the number of characters. Use some courses from your software engineering year program. points
Design a Student class with id fullName both String type and a list of courses Course type data fields with a constructor that takes all the data fields as arguments. Student's id's are fixed in size but full name is not. points
Your main function should start by reading the students. bin binary file into a list of students more on this file later and calling a function that presents a menu to the user. Menu options should be
a Create a student and add it to your list of students. Make sure that id is unique for each student, that is your application should enforce that. The Uniqueness constraint of id's could be implemented as a later step. Think of ways to accomplish this. with uniqueness
b Search the list of students by id or name. Search should return a list of students. And print them to the terminal using only their id and full name. points
c Delete a student from the list given an id using the search results in b or if the id of the student is known points
d Update a student from the list given an id using the search results in b or if the id of the student is known points
e Print only the full names of the students to the terminal stored in the list of students. points
f Print the courses taken by a student given the student id using the search results in b or if the id of the student is known points
g Send the obtained information based on these queries. More on this later.
h Save the list of students to a binary file in the format described below. This will be implemented as a step below.
i Exit the application. Termination of the application should save the inmemory representation of the list of students in the file. Note that you have a list of students in a list in memory when your application is running and an infile version of it both of which might be different. Why? Saving the list of students to its file will synchronize the two, that is they will be the same.
Note that at this point since you do not have to save the list of students to a file, you can create student objects in the main function and add them to your list to test the above steps without having to read the file to populate your list of students when you start your application.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started