Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Aussie Best Car (ABC) has now decided to award an additional bonus based on the bonus contributed by the sales of an individual car type. It decides to award an additional bonus of x% of the bonus contributed by the sales of Toyota Kluger, y% of the bonus contributed by the sales of Nissan Patrol and z% of the bonus contributed by the sales of Ford Territory. The additional bonus rates (i.e. the values of x, y and z) will be determined by the board of directors of ABS.

The Managing Director therefore requests you to extend your program for A2 in order to facilitate the calculation of the additional bonus as follows.

The main program should ask a user (the Managing Director or another employee) to input the additional bonus rates (i.e. the values of x, y and z) one by one, for the calculation of the additional bonus. The program then should pass the additional bonus rate for a car type to a function called find outAdditionalBonus() which will take two inputs: the car type and bonus contributed by the sales of the car type. From the car type information the find outAdditionalBonus() function will collect the appropriate additional bonus rate. The function will return the additional bonus for a car type.

The function find outTotalBonus() will call sub-functions to find out the total bonus as find outd in A2. Moreover, find outTotalBonus() will call find outAdditionalBonus() in a loop to find out the additional bonus for each and every car type. The function will return the grand total bonus (i.e. the total bonus plus the total additional bonus).

The program should display the total sales, sales for each car type, total bonus, bonus contributed by each car type, additional bonus for each car type and grand total bonus.

An ex of a partial output can be follows.

Total Sales: $500,000
Sales of Toyota Kluger: $500,000
Sales of Nissan Patrol: $0
Sales of Ford Territorry: $0

Total Bonus: $500
Bonus contributed by Toyota Kluger: $500
Bonus contributed by Nissan Patrol: $0
Bonus contributed by Ford Territory: $0

Additional Bonus for Toyota Kluger: $50
Additional Bonus for Nissan Patrol: $0
Additional Bonus for Ford Territory: $0

Grand Total Bonus: $550

The program should finally prompt the user with the following message, "Do you want to find out the sales and bonus for another year (Y/N)?". If the user enters "Y" then the whole process will be repeated for another year, except that the bonus rates (as shown in the table in A2) will remain unchanged. The program quits if the user enters "N".

Use multiple functions, instead of using a single function to do everything. Create a good design of the functions to make the best use of the code and avoid duplicate calculations. You also need to design your program so that it has components that can be reused in another program, if needed.

prepare an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some exs of pseudocode can be found at http://www.unf.edu/~broggio/cop2221/2221pseu.htm.

Implement your algorithm in Python.

Avoid duplicate code. For ex, do not find out the bonus in multiple places in your code.

Comment your code as necessary to describe it clearly.

Select 3 sets of test data that will demonstrate the correct "normal" operation of your program.

Run your program using the test data you have selected and save the output it produces in a text file. 

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

Quality management plan it should includea short statement

Quality Management Plan. It should include: A short statement that reflects your team's philosophy or objective for ensuring that you deliver a quality system to your client. Develop and describe the following that your ...

In python why would one use a decision statement contained

In Python, Why would one use a decision statement contained inside the branch of another decision statement?

A software engineering question regarding black-box testing

A Software Engineering question, regarding Black-Box Testing Techniques: Q:- A program computes its output variable T according to the following formula: [ x as in multiply] 1)T = X x 0.2 + Y x 0.4 + Z x 0.4 where X>= 50 ...

The formulas a rarr b and c and a rarr b and a rarr c are

The formulas A → (B ∧ C) and (A → B) ∧ (A → C) are logically equivalent. For this problem, you are going to prove that they are equivalent in two different ways. Prove that A → (B ∧ C) ≡ (A → B) ∧ (A → C) by writing two ...

Question find an article on the www that discusses a recent

Question: Find an article on the WWW that discusses a recent (within the last 2 years) security breach or Cyberattack. Provide a link to the article and suggest 2 Best practices for a user Domain Policy that would mitiga ...

What effect does the teacher have on creating a learning

What effect does the teacher have on creating a learning environment with little to no behavior problems?

You have a senior project you have to write 20 page long

You have a senior project You have to write 20 page long pages. You also have to make a project on a card explain what i m talkiing about. it should CIS program so utilize thre SDLC project management, databases, coding, ...

Need help with a java program that takes two arrays a and b

Need help with a Java program that takes two arrays a and b of length 5 storing int values, and returns the dot product of a and b. That is, it returns an array c of length n such that c[i]=a[i]*b[i].

When i have a class that extends application public class

When I have a class that extends Application (public class Game extends Application) I can easily call it from my driver class by typing launch(Game.class). Now I have two other classes where one extends JFrame and the o ...

What is the sum after execution assume that min and max are

What is the SUM after execution? Assume that MIN and MAX are integers provided provided by the user, and that MAX is greater than MIN. (Solve without choosing actual values) INPUT MIN, MAX SUM= 0 DOFOR M= MIN, MAX SUM= S ...

  • 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