Question

In: Computer Science

In each regional branch of Marc-Lu sales company, every salesclerk has a monthly base salary. The...

In each regional branch of Marc-Lu sales company, every salesclerk has a monthly base salary. The salesclerk also takes a bonus at the end of each month based on the following criteria: If the salesclerk has been with the company for three or less years, the bonus is $100 for each year that he or she has worked there. If the salesperson has been with the company for more than three years and less or five years, the bonus is $200 for each year that he or she has worked there otherwise the bonus is $ 300. The salesclerk can also earn an extra bonus as follows: If the total sale made by the salesclerk for the month is more than $ 5,000 but less than $10,000 he or she receives a 3% commission on the sale. If the total sale made by the salesclerk for the month is at least $ 10,000 he or she receives a 6% commission on the sale.

a) Design an algorithm that calculates the monthly payment of a salesclerk at given regional branch.

b) List all the variables required to write this program.

c) Use the algorithm in (a) to write a complete C++ program to calculate monthly payment of a salesclerk at a given regional branch.

Solutions

Expert Solution

a) Design an algorithm that calculates the monthly payment of a salesclerk at given regional branch.

1. Begin

2. Initialize a value to basesalary.

3. Read name, years, sales

4. If years <3 Then

5. Compute bonus=100*years

6. Else If years>=3 and years<=5

7. Compute bonus=200*years

8. Else

9. Compute bonus=300*years

10. End If

11. If sales<=5000

12. Compute comm=0.0;

13. Else If sales>5000 and sales<10000

14. Compute comm=sales*0.03

15. Else

16. Compute comm=sales*0.06;

17. End If

18. Compute salary=basesalary+comm+bonus

19. Print name,basesalary,bonus,comm,salary

20. End

b) List all the variables required to write this program.

name,  years, sales, bonus,  basesalary, comm, salary

c) Use the algorithm in (a) to write a complete C++ program to calculate monthly payment of a salesclerk at a given regional branch.

C++ program pasted below.

#include <iostream>
using namespace std;
int main()
{ char name[20];
int years,sales,bonus;
//initialize monthly base salary to 3000
float basesalary=3000,comm,salary;
cout<<"Enter the name of Employee:";
cin>>name;
cout<<"Enter years of experience with the company:";
cin>>years;
cout<<"Enter the amount of sales:";
cin>>sales;
if(years<3)
bonus=100*years;
else if(years>=3 && years<=5)
bonus=200*years;
else
bonus=300*years;
if(sales<=5000)
comm=0.0;
else if(sales>5000 && sales<10000)
comm=sales*0.03;
else
comm=sales*0.06;
salary=basesalary+comm+bonus;
cout<<"Name:"<<name<<endl;
cout<<"Base salary:"<<basesalary<<endl;
cout<<"Bonus:"<<bonus<<endl;
cout<<"Commission:"<<comm<<endl;
cout<<"Net Salary:"<<salary<<endl;
return 0;
}

Output Screen


Related Solutions

Dina has received a job offer from Amegy bank as branch manager. Her base salary will...
Dina has received a job offer from Amegy bank as branch manager. Her base salary will be $50,000 today. Assuming for simplicity that she will receive $50,000 today and her next annual salary with the appropriate increment one year from today. Her increment will be 5 percent each year if she performs well in the bank. Each year she will receive a bonus equal to 10 percent of her salary and her first bonus will be one year from today...
Jan 1. The company haired 4 employees with a monthly salary of 1,500 each. The salary...
Jan 1. The company haired 4 employees with a monthly salary of 1,500 each. The salary is to be paid on the first day of each month. How will be recording the transaction?
The monthly salary S of a shop assistant is the sum of a fixed salary of $500 plus 5% of all monthly sales. What should the monthly sales be so that her monthly salary reaches $1500?
The monthly salary S of a shop assistant is the sum of a fixed salary of $500 plus 5% of all monthly sales. What should the monthly sales be so that her monthly salary reaches $1500?
Bill has monthly gross salary of $3,000 and take-home salary of $2,100. His monthly expenses amount...
Bill has monthly gross salary of $3,000 and take-home salary of $2,100. His monthly expenses amount to $1,000 and he saves $300 per month and uses the rest to pay his debts. He has cash in checking account of $2,500, emergency fund savings account of $4,200. He also owns a car with estimated value of $12,000. He owns personal possessions valued at $3,500. His credit card debts total $750 and other short-term debts are $800. The only long-term debt he...
Our organic fish company pays $8,000 in monthly salary to its general manager. The company has...
Our organic fish company pays $8,000 in monthly salary to its general manager. The company has a profit-sharing plan that results in the GM receiving an end-of-year bonus totalling $25,000. Draw the cash-flow dia- gram representing the salary payments if a. the salary is paid at the end of month. b. the salary is paid at the beginning of the month. In both cases, assume that the bonus is always paid on December 31, and use P for present worth....
Monthly Sales Tax A retail company must file a monthly sales tax report listing the total...
Monthly Sales Tax A retail company must file a monthly sales tax report listing the total sales for the month, and the amount of state and county sales tax collected. The state sales tax rate is 5 percent and the county sales tax rate is 2.5 percent. Write a Python program with function(s) that asks the user to enter the total sales for the month. Make sure that you do not allow user to enter negative values for the total...
Monthly Sales Tax Program A retail company must file a monthly sales tax report listing the...
Monthly Sales Tax Program A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Write a program that asks the user to enter the total sales for the month. The application should calculate and display the amount of county sales tax, the amount of state sales...
In C++ write a program with a base class thet has a pure virtual function SALARY,...
In C++ write a program with a base class thet has a pure virtual function SALARY, and two derived classes. In the first derived class salary is increased by 20%, in the second derived class salary is increased by 30%
A branch manager has 4 inside sales employees. The manager wants to know if there is...
A branch manager has 4 inside sales employees. The manager wants to know if there is any difference between these employees in terms of average time to enter an order into the system. You are tasked to evaluate the collected data and prepare a report regarding your findings. Order Number Employee I Employee II Employee III Employee IV Time to Enter (in minutes) 1 5 12 8 10 2 7 12 11 9 3 9 2 7 5 4 6...
Marc Batchelor, a self-employed sales consultant, has estimated annual earnings of $303,000 this year. His social...
Marc Batchelor, a self-employed sales consultant, has estimated annual earnings of $303,000 this year. His social security tax rate is 12.4% up to the wage base, Medicare is 2.9%, and his federal income tax rate is 24%. How much estimated tax (in $) must Marc send to the IRS each quarter?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT