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 c++ program that reads in the average monthly rainfall

Write a C++ program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months

  Counts all occurrences of a given string from such a bag

Write a C++ function that removes and counts all occurrences of a given string from such a bag.

  Submap that accepts two maps from strings

Write a method called subMap that accepts two maps from strings to strings as its parameters and returns true if every key in the first map is also contained in the second map and maps to the same

  Powers of a user specified range of integer numbers

Write a C program to print a table of the powers of a user specified range of integer numbers. The program should also print the sum of the powers of the numbers.

  Write a program that has user enter

Write a program that has user enter a sentence and then determine how many lower case letter were entered. You need to write a logically coherent function that will determine if character is lower case or not. Main will also display the total?

  Write a function named vowelwords

Write a function named vowelwords(), that reads the file text1.txt and create a new file named text2.txt, which shall contain only those words from the file text1.txt which don’t start with an uppercase vowel(i.e., with ‘A’,’E’,’I’,’O’,’U’)

  Draws a single level for a "rogue­like" computer game

You will write a program that draws a single level for a "Rogue­like" computer game. The program will parse a line of input text from an input file (room.txt), use the parsed text to determine the shape of the room and its contents and then draw the ..

  State a program that reads an integer from the keyboard

Write a program that reads an integer from the keyboard, and prints the integer to the screen. You must write a function to do this task. After the integer is printed, you must call a function (that you write) which asks the user to enter a ‘Y' or..

  Struct complex

A complex number can be represented by two parts, real and image. A series complex data can be organized as a group of elements by linked list, which is shown as below: struct Complex

  A program in c that adds and subtracts two arrays of size 3

a program in c that adds and subtracts two arrays of size 3 rows of 4 columns using functions to add the arrays and

  Write a program to display the total salary for assistant

Write a program to display the total salary for assistant professors, associate professors, full professors, and all faculties, respectively, and show the average salary for assistant professors, associate professors, full professors, and all facu..

  Program reads a number and prints all of its binary digit

Write a program that reads a number and prints all of its binary digits. Print the remainder number % 2, thenreplace the number with number / 2. Keep going until the number is 0.

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