Answered step by step
Verified Expert Solution
Link Copied!

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 4-year program. (5 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. (10 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. (15 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. (20 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)(25 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)(30 points)
e. Print only the full names of the students to the terminal stored in the list of students. (35 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)(40 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 in-memory 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 in-file 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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions