Theaussie best car abcauthority now wants to create a

Assignment Help Application Programming
Reference no: EM13379957

TheAussie 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: 2014

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

 

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: 2014

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

After 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. 

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.

Rationale

Reinforce topic material related to files and exceptions.

Reinforce topic material related to lists.

Reference no: EM13379957

Questions Cloud

Need a 1000 word paper on the various recentnews on the : need a 1000 word paper on the various recentnews on the united states particular the group known as anonymous and
1how is a network layer protocol different from a transport : 1.how is a network layer protocol different from a transport layer protocol?2.into which class of networks do the
1 how big is the mac address space the ipv4 address space : 1 how big is the mac address space? the ipv4 address space? the ipv6 address space?nbspnote the size of an address
Examine possible risks that can arise when systems are : examine possible risks that can arise when systems are constructed using cots. what steps can an organization take to
Theaussie best car abcauthority now wants to create a : theaussie best car abcauthority now wants to create a database for the sales and bonus records of different years.the
Aussie best car abchas now decided to award an additional : aussie best car abchas now decided to award an additional bonus based on the bonus contributed by the sales of an
Aussie best car abcdeclares that based on its yearly sales : aussie best car abcdeclares that based on its yearly sales it will award a bonus as follows. the bonus will be equally
The managing director of aussie best car abc has invited : the managing director of aussie best car abc has invited you to build a new computer system for them in python. the abc
Write a program that simulates an airplane race the program : write a program that simulates an airplane race. the program will display a table showing the speed in kmhour and

Reviews

Write a Review

Application Programming Questions & Answers

  In this project you will create an application to run in

in this project you will create an application to run in the amazon ec2 service and you will also create a client that

  Imagine that your company has decided to expand to the web

imagine that your company has decided to expand to the web. you want to reuse some data entry code that has been

  1 here is a short program it prints out the value of a

1. here is a short program. it prints out the value of a variable x. ernie and bert disagree about what will be printed

  If the user wants to read the input from a file then the

if the user wants to read the input from a file then the output will also go into a different file. if the user wants

  Question 1we are given the following knowledge base of

question 1we are given the following knowledge base of travel informationnbspbycaraucklandhamilton.

  Basic requirementsscreen one has three edittext views and

basic requirementsscreen one has three edittext views and one button.the edittext views allow you to enter a students

  Create a application using the mvc architecture no

create a application using the mvc architecture. no scripting elements are allowed in jsp

  Rtl sa is a company which develops bespoke solutions for

rtl sa is a company which develops bespoke solutions for the rubber industry. they produce both rubber compound which

  Design a program that models the worms behavior in the

design a program that models the worms behavior in the subsequent scenarioa worm is moving toward an apple. each time

  Problem build a class for a type called fractionnbspthis

problem build a class for a type called fraction.nbspthis class is used to show a ration of two integers.nbsp include

  Part - 1 object-oriented designwrite a program that allows

part - 1 object-oriented designwrite a program that allows an instructor to keep a grade book. each students has scores

  Soda vending machine designnbsp design a soda vending

soda vending machine designnbsp design a soda vending machine that can deliver three kinds of soda a b and c. allnbsp

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