Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Three salespeople work at Sunshine Hot Tubs. They are Andrea, Brittany, and Eric. You will prepare a program that will prompt the user for a salesperson's initial ('A' for Andrea, 'B' for Brittany and 'E' for Eric), will take an entry for the salesperson's amount of sales, and will collect a total of commissions for each individual salesperson. If a letter other than A/a, B/b or E/e is entered give the user an advisory that the entry is not recognized so they can enter again. find out the salesperson's total commission earned as 10 percent of each sale amount and accumulate a running total commission for each individual.
The program will loop to take inputs for any combination of the salespeople until a 'z' or 'Z' is entered at the prompt for the initials. If the user types a 'z' or 'Z' the input process will end and the results will be printed to the console for each salesperson.
These are the code construct requirements for the program that must be met:


1. Create a project called Assignment2_yourlastname and separate from that wrapper class create a class named Sales.
2. Sales class data members for a char letter input from the console, a double to hold each individual sale as it is entered and a double for each of the individual salesperson's total commission.
3. Sales class will have a constant (const) double COMMRATE data member that will be set to 0.10.
4. A class method to initialize class data members.
5. A class method implementing a sentinel loop that will take the inputs for initial and sales amount until the sentinel 'z' or 'Z' is entered and will then find out a running total of commission for the individual sales person entered.
6. A class method to print the total sales commissions for each salesperson.
7. In Main you will instantiate one Sales object and will call each of the class methods in turn.
8. Internal documentation

The following is ex output:

Enter a salesperson initial B
Enter amount of sale 2222.22
Enter next salesperson or Z to quit a
Enter amount of sale 1111.11
Enter next salesperson or Z to quit e
Enter amount of sale 3333.33
Enter next salesperson or Z to quit b
Enter amount of sale 2222.22
Enter next salesperson or Z to quit a
Enter amount of sale 1111.11
Enter next salesperson or Z to quit z
Andrea earned $222.22
Brittany earned $444.44
Eric earned $333.33
Press any key to continue . . .  

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M986918

Have any Question?


Related Questions in Computer Engineering

Pablo bought some rural property in oconee county that is

Pablo bought some rural property in Oconee County that is rumored to be part of an expansion of the Epps Bridge Center phenomenon. The developer of the party told him that the property could triple in value under the exp ...

A scavenger hunt question from the assigned

A scavenger hunt question from the assigned readings.) Consider the statement if ((a! = null)&&(a.x()))a.y(); What feature of the a && b makes it classify as a control structure? Rewrite this as 2 nested if statements. W ...

The sunshine health corporation has requested you evaluate

The Sunshine Health Corporation has requested you evaluate their Scottsdale, Arizona facility. The original structure was built in 1965. The facility has undergone several remodels aesthetically, with no real infrastruct ...

A study indicates that the weights of adults are normally

A study indicates that the weights of adults are normally distributed with a mean of 140 lbs and a standard deviation of 25 lbs. Find a value of weight x such that only 20% of adults weigh less than that. A. 136 B.190 C. ...

A new machine averages 4 clock cycles per instruction and

A new machine averages 4 clock cycles per instruction, and runs at a system clock of 20 MHz. The Axiom-Verge algorithm set to benchmark the system will take an even 3000 instructions to complete. a) Knowing how many cloc ...

Benefits of abating emission mb500-20acost of abating

Benefits of abating emission: MB=500-20A Cost of abating emission: MC=200+5A What are the marginal benefit and marginal cost of abatement at socially efficient level of abatement? What is the net social benefit at the ef ...

Suppose there are three decks of cards on the table a

Suppose there are three decks of cards on the table, a number is written on each card. And each deck is sorted in decreasing order (The maximum value is on the deck in top). The goal is to find the minimum value between ...

A researcher thinks that listening to classical music

A researcher thinks that listening to classical music reduces anxiety. She measures the anxiety of 10 persons then plays Mozart's "Eine Kleine Nachtmusik". Following that the researcher measures their anxiety again. (Not ...

With respect to tm4c123 arm cortex m4 processorhow many

With respect to TM4C123 ARM Cortex M4 Processor How many machine cycles are required to process first line of ISR after an interrupt occurs? What are the other benefits of NVIC to process interrupt more efficiently?

A small library keeps a roster of who will be at the desk

A small library keeps a roster of who will be at the desk each day. They have a database table as shown below. Week Start___Mon___Tue____Wed_____Thur____Fri 17/10/2011 -- Jane -- Sue -- George -- Sue -- Jane 24/10/2011 - ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As