Write and implement a cpp class which represents a book

Assignment Help C/C++ Programming
Reference no: EM131752681

Assignment

Book Class

Design and implement a C++ class which represents a Book, and use this class in a main program which reads in information for multiple books from a data file and outputs them in a nice format to display what books are available for purchase.

Requirements

A book has a title, an author (first and last names), a format (Hardcover, Paperback, Ebook, Audiobook), a publishing date, and a price. NOTE: This should be a number since we will use it later to calculate the total cost of our purchases.

As for member functions, you will want one (or more) constructor functions for this class, a Display function (nicely formatted, no more than 2 output lines per book), and "Get" and "Set" functions for each data member ("Get" functions are functions that return a particular data member, "Set" functions are functions that use a parameter value to set the value of a particular data member).

The main program will read a line from the file, process the data into a book, and display the book until you reach the end of the file. The algorithm for the main program is as follows:

Open input file and check to see that it opened

Read one line containing book information

While not at the end of the file

Process one line of information into a book

Display the book

Read one line containing book information

Close the file

When implementing this algorithm, each step should either be one line of code or a function call. Later on, we will reuse our Book class in another main program for the next project. BE SURE TO SAVE A COPY OF IT.

Submission Guidelines

All source code must include program purpose, your name, date, and other comments, be properly indented and use descriptive variable names where appropriate. Submit a zipped file of your Project folder. This will include your main program (MainBook.cpp) and your class files (Book.h and Book.cpp) as well as the correct directory structure and project files, to the Programming Problem 3 drop box in D2L. I will be looking at the code and running the program from your project. Your grade will depend on how it compiles and runs, if the desired output is produced, and programming style.

Ethical Programming Guidelines

· This is an individual assignment; the work you turn in must be yours and yours alone.

· You are free to share conceptual ideas (BUT NOT CODE) with fellow students without any computing device present.

· You are free to use any example code provided by the instructor.

· You can consult SIs and the instructor for assistance with your code, but you must have your algorithm written before you will get help.

· You may NOT share code with another student.

· You may NOT "team" code.

· You may NOT coach code another student.

· You may NOT solicit help from the Internet (forums, crowd-source your project).

Reference no: EM131752681

Questions Cloud

Review problem on business sells sunglasses : Assume a business sells sunglasses. Estimated sales are: July: 15,000 units, August: 20,000 units and September: 10,000 units and October: 5,000 units.
Risk premium and the expected return on the market : A stock with a beta of 1.6 is expected to return 13.4%. What are the market risk premium and the expected return on the market?
Calculate the uncollectible account expense : would the increase or decrease the % used to calculate the uncollectible account expense
Conditions on the business software and services industry : For Microsoft Corporation, what are the implications of the current economic conditions on the Business Software and Services Industry?
Write and implement a cpp class which represents a book : Design and implement a C++ class which represents a Book, and use this class in a main program which reads in information for multiple books from a data file an
Enter the transaction letter as the description : Enter the transaction letter as the description when entering the transactions in the journal
Overall change in the city net position on the gwfs : What was the correct overall change in the city's net position on the government-wide financial statements?
Provide a critical analysis of your selected topic : Create a clearly stated thesis, and focus the entire paper around it. Provide specific examples to support this thesis.
Discuss the data provided in the sheet labeled cash flows : Using the data provided in the sheet labeled "Cash Flows" prepare

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd