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

  Consider which properties could be verified

define that some properties that can only be validated originally can be approximately transformed to properties that could be verified.

  Explain electrical and computer engineering

Electrical and Computer Engineering, Suppose Xt is a random process which is second-order stationary. Show that it is also stationary of order 1.

  Make a web page named double.html

design a Web page named double.html whose HEAD includes the DoubleIt function. The page should contain a text box with an initial value of 1 and a button labeled "Double It". When user clicks the button, the DoubleIt function should be called to d..

  Make an html page with a form for client

make a form using JavaScript that collects client body statistics and customer contact information for record keeping and marketing purposes.

  Summarize the challenges the team faced

Create a 10 - 15 pages PowerPoint presentation with audio narration which covers 1 - 4. Each member needs to add audio presentation at least for his/her selected risk.

  How to use the ''time'' function and the difftime function

The two searches to use for comparisons are the Linear Search and the Binary Search. You will search for 1000 strings in the array of 3000 strings and find out the average number of probes needed to find a match. The target string would be a rando..

  How to adapt for large-scale transnational it projects

What aspects of your project communications planning would you adapt for large-scale transnational IT projects in that the project teams and other stakeholders are geographically dispersed (say in India, Canada, China and Brazil) and having differ..

  What technologies must be used to secure those areas

The employees have hopes of making the breakthrough and bringing the company public in next two years. You have been hired as a security consultant to assess the company's needs.

  Write a program that reads a sequence of input values

Write a program that reads a sequence of input values and displays a bar chart of the values in data.

  Formulate a debugging strategy

Formulate a debugging strategy. What module should be debugged first, what inputs should you use, what outputs should you expect to see? How should you begin to integrate the modules? What should you do on failure?

  Implement the lzw algorithm

The LZW algorithm compresses a given text by figuring out patterns which appear very often in the text. The basic idea is to replace (perhaps very long) patterns which appear many times by a much shorter code. Read about this algorithm here .

  Explain the two methods which are used to give concurrent

describe the two methods that are used to provide concurrent operations of multiple processes on a single cpu. what are

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