I gang

Write some Software

The Aussie 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. The ABC authority 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.

<D>lete 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 “[url removed, login to view]” (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 called CalculateAdditionalBonus() that will then be used by another function called CalculateTotalBonus() 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 all 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

 

Total Profit: $50000

Net Profit: $49450

 

 

 

The program will then store the information (as displayed) in a text file called “[url removed, login to view]”. All information will be appended in the [url removed, login to view] file.

 

After storing the sales and bonus information in the [url removed, login to view] 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.

 

Note that, your program should be able to resist duplicate entries for a year. That is, if information for a particular year (such as 2010) is already entered into the database (i.e. [url removed, login to view]) and a user tries to enter information on the same year again then your program should give a feedback to the user saying that “Duplicate entry is not permitted”.

 

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 [url removed, login to view] 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

 

Total Profit: $50000

Net Profit: $49450

 

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.

 

If the option <D> is chosen then the program should ask for the year for which the information should be deleted from the database (i.e. [url removed, login to view]). If a user chooses 2010 then all information for 2010 will be deleted from the database. If no information for 2010 already exists and a user tries to delete the information then your program should give a feedback to the user saying “The entered year does not exist in the database”.

 

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 at [url removed, login to view]~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.

Færdigheder: PHP, Software Arkitektur

Se mere: write want, types data entry software, types algorithm data structure, types algorithm, types data structure, tries data structure, tries algorithm, text search algorithm, sets data structure, search data structure, search algorithm examples, python shop, process data structure, need python code, list data structure, implementation data structure, give examples algorithm, explain data structure, explain algorithm example, explain algorithm, examples data structure, examples algorithm, different types algorithm, different types data structure, different type data structure

Om arbejdsgiveren:
( 0 bedømmelser ) sydney, Australia

Projekt-ID: #5988740

Tildelt til:

aleksamarkoni

Hi there, I am ready to work right now. I all ready have something coded up, so you can pm to see the solution right away if you are interested. And pls review my all skill's. Best regards, Aleksandar Mar Mere

$50 AUD på 1 dag
(0 bedømmelser)
0.0

6 freelancere byder i gennemsnit $150 for dette job

samitXI

Hi Sir, I am ready to work for you.I have 9 years of experience in C/C++, python , PHP and, MySQL. please see some of my works also check my reviews you will get better idea about my skill.I deliver quality work withi Mere

$250 AUD in 5 dage
(104 bedømmelser)
7.1
phpsunil

A proposal has not yet been provided

$147 AUD in 3 dage
(17 bedømmelser)
5.0
reachramhere

Hi , We, Veltrod software services are a software consulting company specialized in providing Mobile, ECommerce and Social media frameworks using cutting edge and emerging technology. Leveraging best-in-class peop Mere

$144 AUD in 3 dage
(2 bedømmelser)
1.4
rabinrai44

A proposal has not yet been provided

$155 AUD in 3 dage
(0 bedømmelser)
0.0
MASTERABDULLAH

hi sir, i hope i can do this task with little effort and i have done several such tasks as before in my professional career and hope this can also be done you can trust without any confusion hope you will find me Mere

$155 AUD in 3 dage
(0 bedømmelser)
0.0