C++ Programming Instruction: Use the code written after the following picture. T
ID: 3603545 • Letter: C
Question
C++ Programming
Instruction: Use the code written after the following picture.
The question is homework 4, it is in the picture. Follow the code written beneath it to do the questions on homework 4.
Instruction: Use the following code to do homework 4.
Homework 4 Library Application with Music and Video Due Wednesday, October 25, at the beginning of class. Hand in hard copy of your code and be prepared to run your program. Develop your program as follows .Complete part 1 before you begin part 2. The main program and each class definition must be in separate files. . Hard code test data in the program. Do not enter test data when you run the program. . Use functions to break your main program into components .Add a comment at the beginning of classes and functions to describe behavior Part 1 - Publication Class In your solution to homework 3, rename Book to Publication wherever it appears. Test your program to ensure it works properly Part 2- Book, Music, and Video classes Add a new Book class, as well as Music and Video classes. All three classes are derived from the Publication class. Add these member variables Book class e pages . format (hardcover, softcover, digital) Music class duration (seconds) format (MP3, AAV, WAV) Video class resolution (low, high, 4K) producer . * All three classes should have constructors, get, and set functions. Extend your main program to edit and display Publication and Person data, using this menu 1) Display people 2) Display publications 3) Edit people 4) Edit publications 5) Check out publication 6) Check in publication 7) QuitExplanation / Answer
#ifndef HOMEWORK_3_PEARSON_H #define HOMEWORK_3_PEARSON_H #include #include using namespace std; class Person{ string name; int id; string email; public: Person(){ } Person(int p_id,string p_name,string p_email){ name=p_name; id=p_id; email=p_email; } void setName(string p_name){ // will set Name name=p_name; } void setId(int p_id){ //will set Id id=p_id; } void setEmail(string p_email){ //will Set email email=p_email; } string getName(){ // will get the name return name; } int getId(void){ //will get the id return id; } string getEmail(){ //will get the Email return email; } }; #endif //HOMEWORK_3_PERSON_H #ifndef HOMEWORK_3_BOOK_H #define HOMEWORK_3_BOOK_H #include #include using namespace std; class Book{ string title; string author; bool status; // checked out : true, checked in: false public: Person borrower; Book(){ } Book(string b_title,string b_author){ title=b_title; author=b_author; status=false; //by default, not checked in } void setBorrower(Person p){ borrower=p; } Person getBorrower(){ return borrower; } void checkIn(){ status=false; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.