Question: # include using namespace std; #ifndef BOOK_H #define BOOK_H string get_authorName(); string get_title(); string get_publisher(); string get_city(); string get_state(); int get_publicationYear(); void set_authorName( string); void

# include
#ifndef BOOK_H #define BOOK_H
string get_authorName(); string get_title(); string get_publisher(); string get_city(); string get_state(); int get_publicationYear(); void set_authorName( string); void set_title( string title); void set_publisher( string publisher); void set_publisher( string publisher); void set_state( string state); void set_publicationYear(int year); string toCitation();
#endif
This is my book h file
In this case, start directly using three files: a header, the code of the class, and the main program. The goal is to program a class that models a contact in a phone application. Step 1. Follow the same guidelines as in Part 1 in order to create and code your class (Contact.h, Contact.cpp, main.cpp). Start with the header file to define your class. a) Define private data members: contactName, phone Number, and also add a data member favoriteBook to your contact. The type of this data member is a Book as created in PART I. You will need to include the Book.h header in your Contact.h header so that the type Book is defined. b) Define a constructor which accepts three parameters for data members. None of the parameters can be empty. c) Define setters and getters for all data members. Step 2. Write the implementation of all the member functions in Contact.cpp Step 3. Test you new class in main.cpp. Accept all the parameters from the user. Create a Book object and set it up with values given by the user. Then create a Contact object and set it up with values given by the user. Print using the following format. Sample output: Enter contact name: John Doe Enter phone number: 555-55-55 Enter author for favorite book: J.R.R Tolkien Enter title for favorite book: Lord of the Rings Enter year for favorite book: 1954 Enter publisher for favorite book: George Allen Ltd. Enter city for publisher: London Enter state for publisher: UK Contact: John Doe Phone: 555-55-55 Favorite Book: J.R.R Tolkien (1954). Lord of the Rings.London, UK:George Allen Ltd
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
