What do you need to declare in the class

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

If you are asked to write three classes : class Person, BookAuthor, and Book. The class Person involves with a person's identity. The class BookAuthor involves with a collection of books or book titles. The class Book involves number of books in stock , book title, and price.

Design the three classes . The classes must use appropriate relationships. Each class must have two constructors, one is the default and the other is an overloaded constructor. Each class has at least two private data members. Try not to use too many member functions due to the time you have. See the grading criteria what you will be assessed on. You are allowed to use one file for the classes, implementations, and the main(). If using separate files, you will earn 2 extra points.

Here is the main( ) which will give you a good clue on developing your classes:

int main( )

{ Book Cplusbk("Tony Gaddis", "C++ Early Object" , 2013, 57.8, 500); // Author's name,

//title, year published, price, andnumber of books in stock).

Cplusbk.Display( ); // displays the Author 's name, Author's

//name, title, year published, price, and number of books in stock.

// The following line with its question is worth 2 points if you your answer is correct.

Book bk1(50.0), bk2(80.0), bk3;

bk3 = bk1 + bk2; // As a result, bk3 contains 130.0 as its price.

Question: What do you need to declare in the class and define to accomplish the bk3 = bk1+bk2; successfully?

return 0;

}

Reference no: EM13863109

Questions Cloud

What will the histogram of pixel intensities look like : Draw the cumulative histogram for this image (see Figure 1). What will the histogram of pixel intensities look like after applying histogram equalization?
How prepare the income statement : Prepare the Income Statement
How a defendant rights at trial can be assured : Write a 1,050- to 1,400-word paper in which you articulate how a defendant's rights at trial can be assured. Include how to assure a defendant is provided the following: The right to a speedy trial
Explain the pretrial process : Write a 400 wordspaper in which you explain the pretrial process, along with the following associated activities- Preliminary examinations and The role of the grand jury
What do you need to declare in the class : Question: What do you need to declare in the class and define to accomplish the bk3 = bk1+bk2; successfully? Design the three classes . The classes must use appropriate relationships.
What is a segment of an organization? : What is the basic difference between absorption costing and variable costing?
Describe the premise of the theory : Explain the theory in detail. Discuss the theorist responsible for coining the theory including the year the theory was created. Describe the premise of the theory
Create draft of service level agreement for silverphase llc : Create a draft of a Service Level Agreement for SilverPhase LLC. Be sure to include specific references to Windows, Mac OS X and iOS support.
What would be a good choice for the other direction and why : We said that at least one direction of a bidirectional search must be a breadth-first search. What would be a good choice for the other direction? Why?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write function that finds the minimum of three double value

1. Write a function that finds the minimum of three double values. This function should use another function that finds the minimum of two double values.

  Create the roman.h and implement roman class in roman.cpp

Create the roman.h and implement the Roman class in roman.cpp. Make sure that you put in measures to prevent multiple inclusion of the header file. Test your implementation using task2a.cpp.

  C++ programming uml diagrams

The goal of this lab is to better familiarize you with polymorphism and the factory design pattern, two key components in Assignment

  In competitive tournament

In competitive tournaments, it is common for all the players or teams to play in a series of matches in order to determine a single winner of the entire tournament. However, a number of different tournament formats exist. Here, we will concern our..

  Write a program that ask a user to enter a list of names

Write a program that ask a user to enter a list of names. When you finish, The program will show the total number of characters in all the names.

  Use a switch statement

Use a switch statement to write a program that prompts user to enter an character.

  Ansi-c program complete assignment as per written in the

complete assignment as per written in the attached

  Lab9 c lab 9 c i request this twice but no answer on this

lab 9 c ltbrgti request this twice but no answer on this please could you check this for

  Find the average of four 16-bit unsigned integers

Write a program (starting at address $4000) to find the average of four 16-bit unsigned integers stored at locations $5000, $5002, $5004 and $5006 and store the 16-bit result at location $5010.

  The main program should create an ifstream

For decryption, the main program should create an ifstream for the file to be decrypted. It should use the getline method of the ifstream to read lines from the file, call the encryption / decryption function with the line to be decrypted, and dis..

  A program that tests the users ability to memorize

a program that tests the user's ability to memorize a sequence of colors

  Prepare an arbitrary sinusoidal waveform

Create a program to compute the derivative of an arbitrary input function, with arbitrary duration and arbitrary limits

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