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

Assignment Help Computer Engineering
Reference no: EM13840223

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.

Reference no: EM13840223

Questions Cloud

Inflation and quantity theory of money : Inflation and Quantity theory of Money. Adapted from Jones Q3 Ch 8: What is the key endogenous variable in the quantity theory? (Read chapter 8 if this isn't clear) Explain the effect on this key variable of the following changes (holding everything ..
Model of money supply under fractional-reserve banking : To increase tax revenue, the US government in 1932 imposed a two-cent tax on checks written on deposits in bank accounts. Use the model of the money supply under fractional-reserve banking to discuss how this tac affected the money supply.
What changes should the firm make in production style : Medfin Accounting Company (MAC) specializes in providing accounting and tax services for medical establishment and professionals. Presently, the company's production method is highly labor-intensive because many of the books keeping tasks are done ma..
What is the proper scientific notation for 21300 l : What is the proper scientific notation for 21300 L
Create a good design of functions to make best use of code : 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.
Decreasing return-to-scale technology : Using graph, illustrate the effect of an increase of the input price on the production and profit of a one input-one output firm with decreasing return-to-scale technology?
Perceptions of mens and womens roles in the economy : Why do the soft technologies open more opportunities for women? To what extent have these technologies impacted the perceptions of men’s and women’s roles in the economy, within marriage, and in society as a whole?
Which of the following is trigonal planar : Which of the following is trigonal planar
Describe the technical characteristics of the dark web : Describe the technical characteristics of the Dark Web ensuring you explain how it works and its underlying technologies - Discuss the impact of the Dark Web on society. In addressing this point, ensure you discuss its purpose and the forces behind i..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Data mining and data mining tools

Describe the data mining and explain the several data mining tools available to the business. Explain the data Warehouse and specify the key attributes of the data warehouse.

  You have been asked to be the project manager for the

you have been asked to be the project manager for the development of an information technology it project. the system

  What sort of code would you put into a function

What sort of code would you put into a function

  Beginning with your code add a jmenubar to your main window

beginning with your code add a jmenubar to your main window with a game menu which contains 5 jradiobuttonmenuitems as

  Prompts the user to enter the number of students

Write down a Java program that prompts the user to enter the number of students and each student's name and score, and finally displays the student with the highest score and the student with second-highest score.

  Analyze the overlap graphs of the voice packet

Analyze the overlap graphs of the Voice Packet End-to-End Delay and Voice Packet Delay Variation graphs. Compare the three queuing disciplines and explain their effect on the performance of the three applications.

  What is difference between client and a server

What are the differences between client and a server. What is function of each layer in a three-layer application?

  Statical natural language processing problem

You will implement an end-to-end document classi?cation system that predicts which category pages belong to, using the classi?cation scheme.

  Suppose you present overview of computers and software to

suppose you present overview of computers and software to individuals who have not utilized computers extensively and

  Computing roots of the function f

The best known iterative method in order compute the roots of the function f (that is, the x-values for which f(x) is 0) is Newton-Raphson approximation.

  Define what is internet storage

You would like to save the digital pictures you took on vacation onto your hard drive, but it would take up too much storage space. You have heard you can enhance your computer's storage capacity by using Internet storage.

  Change the image to a black-to-green scale image

Call a method that will change the image to a "black-to-green scale" image - Call a method that will change the image to a version of a green scale image.(green to white).

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