Create two child classes of salesperson

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

1. Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf. Create an interface named ITurnable that contains a single method named Turn(). The classes named Page, Corner, Pancake, and Leaf implement ITurnable. Create each class's Turn() method to display an appropriate message. For example, the Page's Turn() method might display "You turn a page in a book."

2. Write a program named SalespersonDemothat instantiates objects using classes named RealEstateSalesperson and GirlScout. Demonstrate that each object can use a SalesSpeech() method appropriately. Also, use a MakeSale() method two or three times with each object and display the final contents of each object's data fields. First, create an abstract class named Salesperson. Fields include first and last names; the Salesperson constructor requires both these values. Include properties for the fields. Include a method that returns a string that holds the Salesperson's full name-the first and last names separated by a space. Then perform the following tasks:

- Create two child classes of Salesperson: RealEstateSalesperson and GirlScout. The RealEstateSalesperson class contains fields for total value sold in dollars and total commission earned (both of which are initialized to 0), and a commission rate field required by the class constructor. The GirlScout class includes a field to hold the number of boxes of cookies sold, which is initialized to 0. Include properties for every field.

- Create an interface named ISellable that contains two methods: SalesSpeech() and MakeSale(). In each RealEstateSalesperson and GirlScout class, implement SalesSpeech() to display an appropriate one- or two-sentence sales speech that the objects of the class could use. In the RealEstateSalesperson class, implement the MakeSale() method to accept an integer dollar value for a house, add the value to the RealEstateSalesperson's total value sold, and compute the total commission earned. In the GirlScout class, implement the MakeSale() method to accept an integer representing the number of boxes of cookies sold and add it to the total field.

Verified Expert

In this assignment they asked to write two c program that implements interface and abstract classes. The Turning Demo Class is created which create objects of four classes Page, Corner, Pancake, and Leaf. These four class implements an interface I Turnable which has a virtual function named Turn(). Now these four classes writes definition of their own for Turn(). In the next task Sales person Demo program is written the create instances of Real Estate Sales person and Girl Scout..

Reference no: EM131264674

Questions Cloud

Who do you interact with on a regular basis and how often : Who do you interact with on a regular basis and how often? What salary ranges are associated with jobs in this field? What is the most challenging thing you face in your field? What do you like and not like about this field?
What contracts do you think the winklevoss twins : What contracts do you think the Winklevoss twins and Divya Narendra should have drawn up when they hired Zuckerberg to work for their company? Use credible sources and research to support and explain
Determine the elastic modulus e : Stress-strain data are plotted in Fig. P4.5 for the initial portion of a tension test on AISI 4140 steel tempered at 538?C (1000?F). Note that data points A and B are labeled with their stress-strain coordinates.
Develop the strategic objectives for your new division : Develop the strategic objectives for your new division of the existing business in a balanced scorecard format in the context of key trends, assumptions, and risks. The strategic objectives are measures of attaining your vision and mission
Create two child classes of salesperson : Create an application named TurningDemo that creates instances of four classes: Page, Corner, Pancake, and Leaf. Create an interface named ITurnable that contains a single method named Turn().
Define social responsibility and business ethics : Define Social Responsibility and Business Ethics. List the stages in the development of ethical standards. What are the four main consumer rights?
Obtain the annual package for siriusxm : Be sure to include at least two ratios in each ratio category: liquidity, profitability, and solvency. Explain what each ratio means and what the ratio tells you about your organization's performance in the most recent period.
Write a few sentences on your organization : Write a few sentences on your organization and how it attracts and maintains employees. Does the website state how many employees? What does it say about recruiting?
What advice would a career conscious person give to a friend : She wants to know whether you think she may display it at work.  - What advice would a career-conscious, ambitious person give to a friend?

Reviews

inf1264674

11/4/2016 7:23:13 AM

I have checked the codes,they are working fine. i'm getting correct output as desired. There is no error at all. thanks. i have dont have any query. just need help on my further assignments as well.

Write a Review

C/C++ Programming Questions & Answers

  Write a function sum3darray

Write a function sum3DArray. This function will take a three dimensional array of ints and add all the entries in the three dimensional array. Assume columns and rank are two constants already defined.

  Find out if damjibhai can win

Once a jewel type is removed from the necklace, all other instances of the same jewel type is treated as polished by the person who removed the jewel

  Traveling towards the other at an average speed

Two cities are 3000 miles apart. A plane leaves one of them, traveling towards the other at an average speed of 360 miles per hour. At the same time a plane leaves the other, traveling towards the first, at an average speed of 390 miles per hour.

  Develop a c program

develop a C program for Linux called pipes.c that does the following: In the main() function, it creates a pipe using the pipe() function, then creates two child processes with fork(). Child 1 redirects stdout to the write end of the pipe and then ex..

  Calculate compounded monthly interest

So for example if I were to have an initial balance of $1250.00 with an interest rate of %13 paid over the course of 4 months it should come out to $2038.09 total for interest added to the initial balance

  Find the smallest positive integer

Find the smallest positive integer whose digits add up to 23. The second smallest positive integer whose digits add up to 23 is 689.

  What is the output of the following code

What is the output of the following code

  A company that market is publishing both book and audio cass

A company that market is publishing both book and audiocassette versions

  Need to convert this c code to mips

You need to convert this C code to MIPS - The subsequent is a sample output (user input is 2): Enter an integer: 2 The count of the integers that are greater than 2 is: 3 You have to assure the requirements specific in the instruction.

  Implement a vector class with a default constructor

Implement a Vector class, with a default constructor, a copy constructor, a destructor, and overloaded assignment operator, subscript operator, equality operator, stream insertion operator, and stream extraction operator.

  Program of public class tempconverter

There are numerous opportunities for errors in any program, many times in places that seem too simple to require close attention.

  Implement and test the given function

Implement and test the following function: bool is_palindrome(string s); // Returns true iff s is a palindrome // EXAMPLES: is_palindrome("RADAR") returns true, // is_palindrome("ABCD") returns false

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