As the first step in writing an application for the local book store, we will design and implement a Book class that will define the data structure of the application. Each book has a name, author, type (paperback, hardback, magazine), integer ID and pageCount. Provide some data validation in the appropriate method to ensure that the ID and pageCount are not negative.
As the first step in writing an application for the local book store, we will design and implement a Book class that will define the data structure of the application. Each book has a name, author, type (paperback, hardback, magazine), integer ID and pageCount. Provide some data validation in the appropriate method to ensure that the ID and pageCount are not negative.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
As the first step in writing an application for the local book store, we will design and implement a Book class that will define the data structure of the application.
Each book has a name, author, type (paperback, hardback, magazine), integer ID and pageCount. Provide some data validation in the appropriate method to ensure that the ID and pageCount are not negative.
- Design and implement a Book class with separation, i.e., separate all functions and methods into both the prototype and an implementation below the main.
- Provide constructor methods for Book(void), Book(name, author), and one for all components Book(name, author, type, ID, pageCount)
- Provide accessor (get and set) methods for each property as well as a display method.
- Provide data validation for the ID and pageCount in the appropriate methods.
- Provide a method to calculate the cost for buying books (with a 7.75% sales tax) according to the following chart:
Hardcover: $29.95 per book
Paperback: $15.95 per book
Magazine: $6.99 per magazine
Main: Write and turn in a simple main function that displays a
C++ PLZ <IOSTREAM> THANK YOU!!

Transcribed Image Text:As the first step in writing an application for the local book store, we will design and implement a Book class that will define the data structure of the application.
Each book has a name, author, type (paperback, hardback, magazine), integer ID and pageCount. Provide some data validation in the appropriate method to ensure that the ID and
pageCount are not negative.
1. Design and implement a Book class with separation, i.e., separate all functions and methods into both the prototype and an implementation below the main.
2. Provide constructor methods for Book(void), Book(name, author), and one for all components Book(name, author, type, ID, pageCount)
3. Provide accessor (get and set) methods for each property as well as a display method.
4. Provide data validation for the ID and pageCount in the appropriate methods.
5. Provide a method to calculate the cost for buying books (with a 7.75% sales tax) according to the following chart:
$29.95 per book
$15.95 per book
$6.99 per magazine
Hardcover:
Paperback:
Magazine:
Main: Write and turn in a simple main function that displays a vector of 3 hard coded book objects. Demonstrate that your methods work. (No UI)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY