Write a Java or C++ program that will display the given menu: A Simple Library System 1. Add a Student 2. Add a Book 3. Display All Students 4. Display All Books 5. Search a Student 6. Search a Book 7. Borrow a Book 8. Display Borrowed Books 9. Exit ➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number, surname, first name, age, and sex) ➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number, Title, Author’s name(Surname, first name), date of purchase, and status (available/not available)) ➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name, age, and sex) ➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’s name(Surname, first name), date of purchase, and status (available/not available) ➢ When 5 is chosen, ask the user if he wants to search the list by Surname or ID number. If record is found, display the corresponding record, else display an appropriate prompt. ➢ When 6 is chosen, ask the user if he wants to search the list by Title, Author or Book number. If record is found, display the corresponding record, else display an appropriate prompt. ➢ When 7 is chosen is chosen, display the list of all available books, then ask the user the ID number of the student who wants to borrow a book, the book that he wants to borrow, and the current date. ➢ When 8 is chosen, display the list of borrowed books (display Book Number, Title, borrower’s name(Surname, first name), and date Borrowed) ➢ When 9 is chosen , end the program Other Requirements/limitations ➢ The data(student and book records should be stored in a file for permanent storage (use Java file handling) ➢ Include exception handling (data validation) ➢ Use of Java Swing is not allowed(GUI is n

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a Java or C++ program that will display the given menu:
A Simple Library System
1. Add a Student
2. Add a Book
3. Display All Students
4. Display All Books
5. Search a Student
6. Search a Book
7. Borrow a Book
8. Display Borrowed Books
9. Exit
➢ When 1 is chosen, ask the user to enter the student’s information(5-digit ID number, surname, first name, age, and sex)
➢ When 2 is chosen, ask the user to enter the book’s information(5-digit book number, Title, Author’s name(Surname, first name), date of purchase, and status (available/not available))
➢ When 3 is chosen, display list of all students(5-digit ID number, surname, first name, age, and sex)
➢ When 4 is chosen, display list of all books(5-digit book number, Title, Author’s name(Surname, first name), date of purchase, and status (available/not available)
➢ When 5 is chosen, ask the user if he wants to search the list by Surname or ID number. If record is found, display the corresponding record, else display an appropriate prompt.
➢ When 6 is chosen, ask the user if he wants to search the list by Title, Author or Book number. If record is found, display the corresponding record, else display an appropriate prompt.
➢ When 7 is chosen is chosen, display the list of all available books, then ask the user the ID number of the student who wants to borrow a book, the book that he wants to borrow, and the current date.
➢ When 8 is chosen, display the list of borrowed books (display Book Number, Title, borrower’s name(Surname, first name), and date Borrowed)
➢ When 9 is chosen , end the program
Other Requirements/limitations
➢ The data(student and book records should be stored in a file for permanent storage (use Java file handling)
➢ Include exception handling (data validation)
➢ Use of Java Swing is not allowed(GUI is not required)

Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY