Create a good design of the functions to make the best use


Task

Client Management System

A local shop keeper of your suburb has requested you to develop a system to manage sales database. The shop keeper wants to keep the following details of his daily sales: a unique sales id (a sequential number), customer's first name, last name, post code, and sales amount.
The main program should first display a menu as follows. A user needs to select an operation from the main menu.

Welcome to Tax Return Clients Management:

Please choose an option from the followings.

Add sales details to the database.

Search sales details for a given sales id in the database.

If the user selects the option A the user should be prompted to enter sales details and write (append) the sales details into the ‘sales.txt' file.

If the user selects the option S the user should be prompted to enter a sales id. For the given sales id if a sales id is found in the sales.txt file the details of that sale should be displayed on the screen.

Finally, the program should quit if the user chooses the option Q .

Handle any exceptional situations and avoid invalid inputs from the user.

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 https://www.unf.edu/~broggio/cop2221/2221pseu.htm.

Implement your algorithm in Python.

Avoid duplicate 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.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Create a good design of the functions to make the best use
Reference No:- TGS01120444

Now Priced at $40 (50% Discount)

Recommended (92%)

Rated (4.4/5)