Java or C++ program to display the given output -----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. Return a Book 10. Exit

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question

Java or C++ program to display the given output

-----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. Return a Book
10. 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, ask the user the book number and the student ID number then
update the corresponding record (you will get an additional 10 points(maximum) if
you include this in your program)
➢ When 10 is chosen , end the program


---Other Requirements/limitations---
➢ The data(student and book records must 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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage