Question
Write a Java program to display the following menu until the user types 5 to exit. 1. Add student 2. Add Course 3. Display Student
Write a Java program to display the following menu until the user types 5 to exit.
1. Add student
2. Add Course
3. Display Student
4. Display Course.
5. Exit
When the user wants to Add student, collect student information, such as ID, first name, last name, address, city, state, zip. Store it in the student file. If the file already exists, append the record to the end of the file. Also, verify that the student with the ID does not already exist in the file.
When a user wants to Add course i, collect course information such as Course id, Course name, and Course description. Store it in the course file. If the file already exists, append the record to the end of the file. Also, verify that the course with the ID does not already exist in the file.
When the user wants to Display a student, ask the user to enter the student id, open the student file, search the student file, and display the record if found.
When the user wants to Display the course, is selected, ask the user to enter the course id, open the course file, search the student file, and display the record if found.
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