You are on page 1of 1

CS 112-Assignment-1

Due Date: 29 January 2020


Group Size Maximum 1 Student
Statement
Implementation of a structure-based Library Information System.
Implementation Details
You are required to implement the following 5 interrelated structures.
A. A structure Book with
a. Members: int ID, string/char* BookName, string/char* author, string/char* ISBN, int price, int pages,
int IssuedBy, string/char* IssuedOn, string/char* ReturnDate.
b. PrintAll function which cout’s the details of all the books.

B. A structure BookList with


a. members: Book books (This should be an array of 10 elements)
b. PrintAll function which cout’s the details of the entire list of books in the entire list.
c. A function to add new Book to the arry at any index.
d. A sort function, that should be able to sort the entire array of books in ascending or descending order
of their ID’s.
e. DeleteAll function to remove all books starting from the head of the list.
C. A structure Student with
a. members: int ID, string/char* StdName, int RollNo, int BooksIssued.
b. PrintAll function which cout’s the details of all the student.
c. Print Some function which cout’s the details of the particular student.
D. A structure StudentList with
a. members: StudentList std (This should be an array of 10 elements).
b. PrintAll function which cout’s the details of all the students in the list.
c. Add and Delete functions to add and remove students from the array on the basis of studentID.
E. A structure Library with
a. Members: List which contains Book type objects and StudentList which contains list of students.
b. Functions:
i. Issue a book to a specified student.
ii. Return a book from the student to which it was issued.
c. Print functions to show which books have been issued.
Program Flow:
1. The entire program has to be menu driven. (Keep the menu simple but beautiful)
2. When program starts the user should be able to view the Main Menu and from there the user should
be able to move to the sub-menus.
3. The details of the working of these menus is described below. [Fig. 1]
4. Be sure to demonstrate the exceptions too and handle them properly. By handling, I mean that you
should cout the message.
Submission Guidelines:
 Submit your work in zipped form at amna.arooj@giki.edu.pk
 Subject of the email must be Your Registration Number
 Name of the file should be A1_<yourRollNumber>
 -50% credit for plagiarism (cheating) and an F in the course. We will not tolerate any cheating.

Main Menu 4. Show all Books.


1. Student. 5. Sort Books in Ascending order.
2. Book. 6. Sort Books in Descending order.
3. List. List Sub-Menu
4. Library. 1. Add New List.
5. Exit 2. Delete Existing List.
Student Sub-Menu 3. Show particular List.
1. Add New Student. 4. Show all Books.
2. Delete Existing Student. 5. Delete book from list and assign
3. Show all Students. book to another list.
Book Sub-Menu Library Sub-Menu
1. Add New Book. 1. Issue a book.
2. Delete Existing Book. 2. Return a book.
3. Show particular Book. 3. Print which books have been
issued.
Fig. 1: Program Flow

You might also like