C++ Programming: Part 1 – Person class Write a Person class that tracks subscrib
ID: 3585758 • Letter: C
Question
C++ Programming:
Part 1 – Person class
Write a Person class that tracks subscribers to a library, with these member attributes:
• full name
• identifier (numeric)
• email address
Person has these member functions:
• Constructor - initializes new object
• get and set function for each attribute
Write a main program with these capabilities:
• Create test data for four people
• Display all people
• Edit attributes of an existing person
Part 2 - Book Class
Write a Book class that tracks all books in a library, with these member attributes:
• title
• author
• status - indicates if book is checked out
• borrower – a pointer to the person that has currently checked out book, if any
Book has these member functions:
• Constructor - initializes new object
• get and set function for each attribute
• checkOut - enables Person to check out Book - do not allow if book is already checked
out
• checkIn - enables Person to check in Book
Extend your main program of part 1 with these capabilities:
• Create test data for six books
• display all books in library, along with name of borrower (if any)
• enable people to check books in and out
Explanation / Answer
#include #include #include struct library { char author[20],title[20],pub[20]; int price; library *next; }; int sum=0; void main() { clrscr(); library *head=NULL; library *initial(void); library *purchase(library *); //library *sale(library *);void display(library *); void stock(library *); void search(library *); int choice; while(1) { coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.