Write an algorithm in structured english pseudocode that


Task 1

The Managing Director of Aussie Best Car (ABC) has invited you to build a new computer system for them in Python. The ABC car shop sells three types of cars, Toyota Kluger, Nissan Patrol and Ford Territory. The manager wants the computer software (your Python program) to ask him the selling price of cars, one by one. That is, the program first needs to ask him to enter the price of Toyota Kluger, then the price of Nissan Patrol and finally the price of Ford Territory.

The program then needs to ask the manager to enter the number of cars sold in 2014, one by one. That is, the program needs to first ask and take input on the number of Toyota Kluger, then the number of Nissan Patrol, and finally the number of Ford Territory sold.

Your program should calculate and display the total income of the ABC car shop for each type of car separately. The program then should calculate and display the overall total income of the ABC car shop.

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

Select 3 sets of test data that will demonstrate the 'normal' operation of your program: that is test data that will demonstrate what happens when VALID input is entered. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program. Set it out in a tabular form: the test data, the reason it was selected, the output expected as a result of using that test data, and finally leave space to record the output actually observed when the test data is used.

Implement your algorithm in Python. Comment your code as necessary to explain it clearly.

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

Submit:

1. Your algorithm.
2. The table recording your chosen test data.
3. Source code for your Python implementation.
4. Output listings demonstrating the results of using the test data.

It is important that the output listings are not edited in any way.

Rationale

Reinforce topic material related to the programming work cycle, and the input, processing, output program structure.

Task 2Aussie Best Car (ABC)declares that based on its yearly sales it will award a bonus as follows. The bonus will be equally distributed among all employees.

Yearly Sales Bonus
$0 - $500,000 0.1% of the total yearly sales.
$500,001 - $1,000,000 $500 PLUS 0.2% of the total yearly sales volume above $500,000
$1,000,001 - $5,000,000 $1500 PLUS 0. 3% of the total yearly sales volume above $1,000,000
$5,000,001 - $10,000,000 $13,500 PLUS 0.4% of the total yearly sales volume above $5,000,000
Above $10,000,000 $33,500 PLUS 0. 5% of the total yearly sales volume above $10,000,000

The Managing Director ofAussie Best Car (ABC)has now requested you to extend your program of Assignment 1 so that it also calculates the bonus amount (in dollars), which will be awarded to the employees, based on the above table.The program needs to calculate the total bonus based on the total sales amount of all three types of cars.The program also needs to calculate the bonus amount (in dollars) contributed by the sales of each car type. The bonus amounts contributed by the sales of Toyota Kluger, Nissan Patrol and Ford Territory are calculated separately using the proportion of the sales of an individual car type to the total sales. For example, if the sales amount of Toyota Kluger is 60% of the total sales amount then the bonus contributed by Toyota Kluger is 60% of the total bonus.

Note that the total bonus is determined based on the total sales of all cars (not based on the sales of an individual car type) using the above table.

The program should display (in addition to what it displayed for A1) the total bonus and the bonus contributed by the sales of each car type separately.Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some examples of pseudocode can be found athttps://www.unf.edu/~broggio/cop2221/2221pseu.htm.Select 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program. Set these out in the same format as in Assignment 1.Implement your algorithm in Python.Avoid duplicate code. For example,do notcalculate the bonus in multiple places in your code.Comment your code as necessary to explain it clearly.Run your program using the test data you have selected and save the output it produces in a text file. Submit:1. Your algorithm.2. The table recording your chosen test data.3. Source code for your Python implementation.4. Output listings demonstrating the results of using the test data.

It is important that the output listings are not edited in any way.

RationaleReinforce topic material on simple functions.

Reinforce topic material on decision structures and Boolean logic.

Task 3 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 ofx% of the bonus contributed by the sales of Toyota Kluger,y% of the bonus contributed by the sales of Nissan Patrol andz% of the bonus contributed by the sales of Ford Territory.The additional bonus rates (i.e. the values ofx,yandz) 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 ofx,yandz) 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 CalculateAdditionalBonus()which will take two inputs: thecar typeandbonuscontributed by the sales of the car type. From the car type information the CalculateAdditionalBonus() function will collect the appropriate additional bonus rate. The function will return the additional bonus for a car type.The function CalculateTotalBonus() will call sub-functions to calculate the total bonus as calculated in A2. Moreover,CalculateTotalBonus()will call CalculateAdditionalBonus() in a loop to calculate 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 example of a partial output can be follows.Total Sales: $500,000Sales of Toyota Kluger: $500,000Sales of Nissan Patrol: $0Sales of Ford Territorry: $0Total Bonus: $500Bonus contributed by Toyota Kluger: $500Bonus contributed by Nissan Patrol: $0Bonus contributed by Ford Territory: $0Additional Bonus for Toyota Kluger: $50Additional Bonus for Nissan Patrol: $0Additional Bonus for Ford Territory: $0Grand Total Bonus: $550The program should finally prompt the user with the following message,"Do you want to calculate 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.Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some examples of pseudocode can be found athttps://www.unf.edu/~broggio/cop2221/2221pseu.htm.Implement your algorithm in Python.Avoid duplicate code. For example,do notcalculate the bonus in multiple places in your code.Comment your code as necessary to explain 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.

Submit:1. Your algorithm.2. The table recording your chosen test data.3. Source code for your Python implementation.4. Output listings demonstrating the results of using the test data.It is important that the output listings are not edited in any way.RationaleReinforce topic material related to iteration.Reinforce topic material related to decision structures, Boolean logic and value returning functions.

Task 4TheAussie Best Car (ABC)authority now wants to create a database for the sales and bonus records of different years.The program that you coded for your Assignment 3 (A3) should calculate Total Sales, Total Bonus etc. for a particular year. TheABCauthority now wants to store the detail sales and bonus information for every year in a text file. So you are now requested to modify your program of Assignment A3 as follows.

The main program should first display a menu as follows. A user needs to select an operation from the main menu.

===========================================Welcome to ABC Car Shop:Please choose an option from the followings.A>dd sales details in the database.S>earch sales details for a given year in the database.Q>uit.===========================================If a user chooses the option A> then the program first asks the year (such as 2014) for which the sales and bonus information is being calculated. It then computes the sales amount of each car type, total sales, total bonus and bonus contributed by each car type, as it did before in A3.The program then collects the additional bonus rates for all car types from a text file called "additionalBonusRates.txt" (stored in the same folder) that contains the bonus rates as follows.Toyota Kluger Nissan Patrol Ford Territory========== ========== =========== 10% 5% 3%Once the additional bonus rates are collected the program should pass them to a function calledCalculateAdditionalBonus()that will then be used by another function calledCalculateTotalBonus()like in A3. The program will 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 as it did for A3. However, it will now also display the year for which the sales and bonus information is being calculated. The year will be displayed at the beginning followed by the other information as follows.YEAR: 2014Total Sales: $500,000Sales of Toyota Kluger: $500,000Sales of Nissan Patrol: $0Sales of Ford Territorry: $0Total Bonus: $500Bonus contributed by Toyota Kluger: $500Bonus contributed by Nissan Patrol: $0Bonus contributed by Ford Territory: $0Additional Bonus for Toyota Kluger: $50Additional Bonus for Nissan Patrol: $0Additional Bonus for Ford Territory: $0Grand Total Bonus: $550The program will then store the information (as displayed) in a text file called "sales.txt". All information will be appended in the sales.txt file.After storing the sales and bonus information in the sales.txt file, the program prompts the user with the following message,"Do you want to calculate the sales and bonus for another year (Y/N)?". If the user enters"Y"then the whole process will be repeated for another year. Otherwise the program displays the main menu for choosing an operation.Now if the user chooses the option S> then the program first asks the use to enter the year (such as 2014) for which the sales and bonus information is being searched. To facilitate the Search option you must use the List data structure. The program then collects the sales and bonus information from the sales.txt file and displays it as follows.YEAR: 2014Total Sales: $500,000Sales of Toyota Kluger: $500,000Sales of Nissan Patrol: $0Sales of Ford Territorry: $0Total Bonus: $500Bonus contributed by Toyota Kluger: $500Bonus contributed by Nissan Patrol: $0Bonus contributed by Ford Territory: $0Additional Bonus for Toyota Kluger: $50Additional Bonus for Nissan Patrol: $0Additional Bonus for Ford Territory: $0Grand Total Bonus: $550After displaying the sales and bonus information the program prompts the user with the following message,"Do you want to search for another year (Y/N)?". If a user enters"Y" then the program asks the user to enter the year for which the information needs to be searched and displayed. If the user enters"N"then the program displays the main menu. Finally, the program quits if the user chooses the option Q>.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.Write an algorithm in structured English (pseudocode) that describes the steps required to perform the task specified. Some examples of pseudocode can be found athttps://www.unf.edu/~broggio/cop2221/2221pseu.htm. Implement your algorithm in Python.Avoid duplicate code. For example, do not calculate the bonus in multiple places in your code. Comment your code as necessary to explain 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.

Submit:1. Your algorithm.2. The table recording your chosen test data.3. Source code for your Python implementation.4. Output listings demonstrating the results of using the test data.

It is important that the output listings are not edited in any way.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write an algorithm in structured english pseudocode that
Reference No:- TGS0664104

Now Priced at $70 (50% Discount)

Recommended (92%)

Rated (4.4/5)