““““““““““““““““““““““““““““““““““““““““`

Instructions

Please read the following instructions carefully before submitting
assignment:

It should be clear that your assignment will
not get any credit if:

o       
Assignment is submitted after due date.

o       
Submitted assignment does not open or file is corrupt.

o       
Assignment is copied (From internet/students).

Recommended software for assignment development:

         
Dev C++

Objectives:

To enable students to understand and
practice the concepts of:

  • Variables
    and operators

  • Loops /
    Repetition Structures

  • Switch
    Statement

  • Functions

  • String
    Manipulation Functions

  • Structures

Assignment Submission Instructions

You have to submit only .cpp file on the Assignments interface of CS201 at
VULMS. Assignment
submitted in any other format will not be accepted and will be graded with zero
marks.


Problem:

Structures are used to overcome
the shortcomings of arrays. Basically arrays are used to store more than one
data values of a single datatype.

Ex : int a[100] stores integer
datatype values

Whereas if you want to make
students result database including student_id (int), student_name (char), marks
(float) of more than one student, you cannot use array. Here comes the use of
structures. Structures are user defined datatypes which allows you to store
data of different types.


Assignment Statement:

Write a menu based system in C++ for “Library Book Record
System” that will take input from user for the following menu. You will create
a structure and perform the following operations on the structure.
Press 1 To Enter a Book Record.
Press 2 To Display all Records
of Books Available in Library.
Press 3 To Search Books by Author
Name.
Press 4 To Count Total Books in
Library.
Press 5 To Exit from the System.
*System will take
following inputs from user to enter a book record:

  • Book ID
  • Book Title
  • Author of Book
  • Cost of Book
           
Solution Instructions:

è Use
switch statement for the menu based system.
èYou can use user defined functions
for each of the task mentioned above to manage your code.
To Enter a Book Record

Add_Book();

To Display all Records of Books Available in Library

Display_Books();

To Search Books by Author Name

Book_Author();

Count Total Books in Library

Count_Books();

*Note:
*     
Restrict your system
that it do not allow to add more than 5 books
and on try of adding books more than
limit show message
i.e. “No more space
in System for another book”.

*     
Use strcmp
function to search books by author name in Book_Author();
function.


Facebook
Twitter
LinkedIn
WhatsApp

Leave a Reply

Your email address will not be published. Required fields are marked *