Calculate and display the total income of the abc car shop

Assignment Help Basic Computer Science
Reference no: EM13325436

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.

Reference no: EM13325436

Questions Cloud

What is the critical issue : What is the critical issue?
Find the maximum speed attained by the mime : A bungee jumping mime is attached to a bungee cord 25.0 m long. The mime is in freefall until he gets to the end of the bungee, Find the maximum speed attained by the mime
Complete a project based on the national health service : You will complete a Project based on the National Health Service (NHS) within the UK. One of the original goals put forth in The NHS Plan: A Plan for Investment, a Plan for Reform was to build more than 100 new hospitals.
With what speed was the homework hurled : A disgusted physics student wads up her homework and throws it downward into a trash can. with what speed was the homework hurled
Calculate and display the 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 http://www.unf.edu/~broggio/cop2221/2221pseu.htm.
Compute the simple rate of return : Compute the simple rate of return on the new automated bottling machine. Use straight-line depreciation method. (Round your percentage answer to one decimal place.
What is the electric field midway between the two charges : Two point charges each have a value of 30.00 x 10^-3 and are separated by a distance of .04m what is the electric field midway between the two charges
Estimate the costs of such things as rent : Estimate the costs of such things as rent, gasoline, food, etc. in your local area and decide how far the amount of money shown in the chart would go in taking care of a family of four.
What would be the total annual cash inflows : What would be the total annual cash inflows associated with the new truck for capital budgeting purposes and find the internal rate of return promised by the new truck. (Round discount factor(s) to 3 decimal places and final answer to the closest i..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a class called employee that has the following fields

Finally, write an appropriate toString() method that prints the state of the object. Example: Name: Mark Jones ID Number: 39119 Department: IT Position: Programmer

  Identify position-indicate what pattern is found in thread

Thread the sequence AATCGATAAGCAAAACCGGATTACGATATATAT through the tree. If any pattern is found in any position, identify that position and indicate what pattern is found.

  We are interrupted or disintegrated

Research is compelling that it takes us approximately 4 to minutes return to our work with the same level of through processes whenever we are interrupted or disintegrated. Is it possible to information is fairly constant?

  How does disaster recovery planning ensure business continui

How does disaster recovery planning ensure business continuity?

  Explain what benefits ipv6 will provide for her business

Alice's information systems currently use IPv4. She wants to know if she should upgrade her information systems to IPv6. If so, explain what benefits IPv6 will provide for her business.

  What is server side and client side scripting

Describe and explain 5 underlying concepts that drive interaction design. Please include appropriate details and examples with applicable references in APA style.

  Explain why you would want each feature

Explain why you would want each feature. Do you need to include any other devices in this design?

  Find commercial web site show bleeding edge technology error

Visit the Internet and discover commercial Web sites which show each of the common errors listed below. Give links to those Websites in Microsoft Word document.

  Describe the general tree adt

Describe the General Tree ADT. Discuss different ways for implementing general trees, and compare them in terms of the efficiency of search operations.

  Internet changes consumer and supplier relationships

Considering a focus in area of E-Commerce (EC), how would you think Internet changes consumer and supplier relationships?

  Explain why your technique is lossless and not lossy

Devise a way to compress the following list of last names using a lossless technique. Describe your method and show the compressed list. Explain why your technique is lossless and not lossy.

  What percentage of total cpu time is spent keeping clock

What percentage of the total CPU time is spent maintaining a clock that is accurate to a resolution of one millisecond?

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