Design a program to record and manage the sale transactions

Assignment Help Python Programming
Reference no: EM133563663

Python Programming Principles and Practice

Question 1 A simple sales management system (Back to Beginning)

Western Wholesales Pty Ltd sells variety of products to the re-seller markets. It sells products in the following 6 categories: food, alcohol and beverage, apparel, furniture, household appliances, and computer equipment. Design a program to record and manage the sale transactions of the company and implement the program in Python programming language.

The program maintains the sales records in the computer internal memory and allows the user to manually add the sales records to the computer program and search and delete the sales records. Specifically, the program will display a menu that allows the user to perform different operaions repeatedly. The menu must include the following options:

1. add a new customer to the program. The customer details include the customer_id, the customer's name, the customer's postcode, the customer's phone number. When the user enters the details, only the customer's name is required, other details are optional (leaves it empty). Note, the customer id must be unique and be automatically generated. You may use a positive integer number for the customer id. For convenience to the user, the auto-generated customer id should be displayed after the customer record is successfully added.

2. add a new transaction for a given customer. In this case, the user needs to provide the customer id. If the id exists, the user can then enter the details of a new transaction, ie, date, transaction_id, customer_id, catetegory, and value. Note for each transaction, there must be a unque, auto-generated, transaction id for that transaction record.

3. search customers using a single search string. The search string is compared to the customer's id, name, postcode and phone number. Then the program will display the details of all matching customers. The search must be case-insensitive and must allow partial matches, for example, the search string "john" would match "John Smith" as well as "Elton Johns"

4. search sales transactions using a single string. The search string is compared to customer id, date, category and value. Then the program will display the details of all matching transactions. Note: just like searching for customers, search for transactions must allow partial matches.

5. display the sales transactions for a given customer using the id of that customer. When the customer id is given, the program should display all transactions due to that customer.

6. delete a transaction record with a given transaction id.

7. delete a customer with a given customer id together with all transaction records due to this customer.

8. quit: to quit the program
Restrictions:
• your design must be modular with at least two modules (in addition to the main module) in your implementation, one provides functionality related to customers and the other provides functionality related to the sales transactions.
• in this question, do not use ndarrays to store the customeer records or transaction records.
• in this assignment, do not use any Data Base Management System or module.
Recommendations:
• use two separate data structures, one to store the customer records and the other to store the sales transactions.

Question 2: Load sales records from files and saves them to files (Back to Beginning)
Revised your solution to Question 1 to add new features in the form of additional menu options:

9. load customer records from a CSV file and add these new records to to those already in the memory. The program should prompt the user to provide a file path. The customer records from the file are added to those already in the memory. Check for duplicates of customer records (ie, records with the same id): in case of duplicate, the one from the file should be ignored.

10. save all customer records from the memory to a CSV file. Your program should prompt the user to provide a file path. If the file does not exist, create a new file. If the file does exist, warn the user that the content of the file would be lost and give the user the option of either changing the file name, overwriting the file, or cancel the operation. Then save the customer records to that CSV file.

11. load transaction records from a CSV file and add these new records to the those in the memory. The ids of these new transactions may need to be re-generated to avoid clashes with those of the existing transactions. Furthermore, for each transaction, you must check whether the customer exists in the memory. Reject those transactions from unknown customers.

12. save all transaction records from the memory to a CSV file. Your program should prompt the user to enter a file path. If the file does not exist, create a new file. If the file does exist, warn the user that the content of the file would be lost and give the user the option of either changing the file name, overwriting the file, or cancel the operation. Then save the transactions records to that CSV file.
You may use Python's builtin module csv to handle CSV files.
For your convenience, I have created two test files Customers.csv and Transactions.csv. The customer file contains the details of 200 customers while the transaction file contains 1000 sales records. The information inside the files are completely fititious and random.
You are required to provide evidence in your assignment documentation that your program was tested successfully using the above test files

You should test your program using multiple test data sets. You may create a few small test sets, perhaps containing a dozen customers and several dozens of transaction records, and use these small test data sets to test your program first. Once your program is tested successfully with these small test data sets, you should then test your program using the above large test data set.
When creating your own test files, use the same column names as in Customers.csv and Transactions.csv.

Question 3: Display sales performance graphically (Back to Beginning)
In Question 1 and Question 2, you may have used two language builtin data structures, such as lists or dictionaries, to store the customer records and transaction records. These builtin data structures provide many useful methods which greatly simplified your programming. For small data size, this is an appropriate design choice. However, if the system is to be used to handle very large data sets, such as thousands of customers and tens of thousands (or even more) of transactions, these data structures would not be the most appropriate to use as they are less efficient compared to the ndarrays.
To improve the system efficiency, in this question, you will revise the program from Question 2 by replacing the two data structures used to store customer records and transaction records with two ndarrays and make the necessary adjustments to the rest of the program.
Furthermore, you will provide the following additional features for analysing the sales performance in the form of the following additional menu options:

13. display the monthly sales values and transaction numbers with two line graphs in one axes. The line graph must have an appropriate title, the labels for X axis and Y axis, and a legend.

14. for a given customer, display the monthly sales values and the number of transactions generated by the customer using two line graphs in one axes. The line graph must have an appropriate title, the labels for X axis and Y axis, and a legend.

15. for a given postcode, display the monthly sales values and the number of transactions generated by the customers located in the postcode area using two line graphs in one axes. The line graph must have an appropriate title, the labels for X axis and Y axis, and a legend.

You should use Python modules numpy and matplotlib for this question.

Documentation and Submission Requirements (Back to Beginning)
Your assignment must be submitted in the form of a single zip archive file to the LMS. No other format will be accepted. The zip file must be named in the following format:
<your last name>_<your first name>_<your student number>.zip
For example, the student, John Smith, with student number 12345678, would name his zip file as Smith_John_12345678.zip

Your zip archive file must contain the following files/folders:
• One PDF document named Assignment.pdf. See the detailed requirements of this file later in this section.
• Three folders named q1, q2 and q3 for each of the three questions. Each folder must contain all files for the question, including the Python code and data files (if any).

You must include all files for each question in a separate folder. If you only include one folder containing all the files for one question, you are deemed to have only submitted your solution to one question, even though that solution may have satisfied the requirements of each of the three questions. In that case, the maximum mark you will receive is 50%.

This file must contain the documents in the following order:
1. Assignment Check List: you must complete this checklist and include it in your PDF file.
2. Extension Granted: if you have been granted an extension, include the email from your Unit Coordinator.
3. Table of Contents: listing of the page number of each question.
4. Documentation for each of the three questions. The documentation for each question must include:
a. The question number and the question title

b. Discussion of your solution: in particular, you should emphasise any aspect of your solution that is novel or unusual. You should also discuss the technical choices available to you, the consideration behind your technical choice, and whether the result of your solution meets your expectation. You should highlight the strength and weaknesses of your solution and point out what improvements can be made to the solution. This discussion should not exceed one page.

c. Self-diagnosis and evaluation: a statement giving the following details for each requirement of the question: what features have been fully completed, and are working, and what features have been completed but not fully working, what features have not been fully completed or not attempted. This statement is essential. You could lose up to 50% of the mark allocated to the question if this statement is missing, misleading, or too vague!

d. Test evidence: for each required feature of the question, you must provide a sufficient number of test cases to demonstrate that your solution meets the requirements of the question. The presentation of each test case must include
- which feature is to be tested,
- the evidence of the test (which can be a copy of your terminal output showing the command and output of the command),
- the conclusion of the test, ie, whether the test evidence proves that the tested feature meets the requirement.

e. A list of the file names: for your Python source code and data files used by your program for the question.
The documentation and submission requirements described above will be strictly enforced. Your assignment will not be marked, or your marks will be significantly reduced if you fail to adhere to the above requirements. Your mark will be substantially based on the test cases you presented. You will not receive a pass mark if the test cases presented do not cover enough required features, and/or do not convince us that your solution satisfies the requirements of the question (regardless of how good your program is).
Policy on the Reuse of the Third-Party Source Code (Back to Beginning)
Please read this section very carefully.

All students are encouraged to complete the assignment independently and write their own source code. I understand, however, that occasionally there may be justifiable reasons to use source code from a third party, including the source code from the Internet and the source code generated by any AI tool such as ChatGPT. Please note that if you have used one or more pieces of third-party source code in your program (this includes the situations where you have made minor modifications to the third-party source code), your assignment will be acceptable only if you have satisfied all of the following conditions:

1. The third party source code is fully identified, including the page numbers and line numbers, in your source code and also in your assignment documentation, and

2. The origin of the third-party code is fully disclosed and acknowledged in your assignment submission, and

3. The third party source code is fully commented in your program listing. All variables, functions and major control structures must be commented to show clearly that you understand the logic of the code, and

4. The third-party source code is less than 10% of your program (in terms of the number of lines), excluding the code specifically allowed to be used, and

5. The source code does not come from a student assignment, whether from Murdoch University or not.
Failure to satisfy any one of the above conditions will result in 0 mark being awarded to your entire assignment.
If unsure, you must seek clarification from your tutor or the unit coordinator, and get his or her confirmation in writing.
The above policy will be rigorously enforced by the Unit Coordinator and Tutors.
Grievance with Assignment Marking (Back to Beginning)

Once you have received your marked assignment, if you have any grievance with the marking, you must raise it with your Unit Coordinator by email, within 7 days of returning of your marked assignment to the LMS, or within the announced deadline in the LMS, whichever is earlier. Otherwise the marks awarded to you will be final and will be used to calculate your final weighted average score for the unit.
Errata (Back to Beginning)

This page is subject to change based on errors found. Any errors found and corrected will be posted in the Announcements page of the LMS. If you print out a copy of this page, please follow the news in the Announcements page of the LMS for any updates.

Attachment:- Python Programming Principles.rar

Reference no: EM133563663

Questions Cloud

What about the minds of others : What is it? Is it valuable? Can there be 'too much' skepticism? What are some things we should always be skeptical about? Should we be skeptical of our own mind
Discuss any social historical religious and political factor : Discuss any social, historical, religious, and/or political factors that may have contributed to these similarities and differences.
Compare what plato says about the prisoner who returns : Compare what Plato says about the prisoner who returns to the cave to what Jesus says about the OldTestament prophets (see Matthew 5:12).
Why do you agree with the utilitarians : Do you agree with the Utilitarians? Why or why not? Focus on why the Utilitarian makes his decision. Please also intentionally include a reason for why someone
Design a program to record and manage the sale transactions : ICT582 Python Programming Principles and Practice, Murdoch University - Design a program to record and manage the sale transactions of the company
What do you feel are qualities and factor that are important : what do you feel are qualities and factors that are important to instructional coaching and why? Be sure to cite textual evidence The book is Robinson
What kind of wisdom does socrates posses : What kind of wisdom does Socrates posses? What does he mean when he says it is better to be as I am?
What exactly does pojman consider to be the fatal flaw : What exactly does Pojman consider to be the fatal flaw in ethical subjectivism? What does this imply about the main purpose of morality?
Does reflection on our mortality lead us to wisdom : Stoicism and Christian ethics encourage reflection on our mortality, i.e., that life is short, and we will one day die. Does reflection on our mortality lead us

Reviews

Write a Review

Python Programming Questions & Answers

  Construct a python function named finder that takes two

Construct a Python function named finder that takes two string parameters, needle and haystack. Your function should find the first.

  Explain what steps you took to test and debug your code

Explain what steps you took to test and debug your code. What issues did you identify and correct while working on the project?

  Create a bar chart with two bars side

Create a bar chart with two bars side-by-side for each year and Create a vertical (i.e. ‘standard') bar chart which displays Formula 1 driver Lewis Hamiltons

  Use the api to get a list of all inventory parts in that set

For each set returned in part a, use the API to get a list of all inventory parts in that set. Since we are only interested in the parts that are used.

  Which stores and manipulates times on a 24 hour clock.

Complete the class Time, which stores and manipulates times on a 24 hour clock. As specified below, write the required methods, including those needed for overloading operators. Exceptions messages should include the class and method names, and ident..

  Exploring the potential of natural language processing

For Reading Purposes. EXPLORING THE POTENTIAL OF NATURAL LANGUAGE PROCESSING AND MACHINE LEARNING IN CHILD LANGUAGE DISORDERS DIAGNOSIS, Preprocessing data from conti-4 : cleaning the raw dataset into structured form for subsequent processing and ana..

  Create a python program that allows user enter class name

Create a Python program that allows user enter class name, faculty name, name of each student, and letter grade each student earned.

  Create an autopsy data ingest module

Create an Autopsy Data Ingest Module, using python 2.7, that runs cipher.exe (cipher /u /n /h) - Finding Encrypting File System (EFS) files

  Write program that uses a function that returns a count

Write program that uses a function that returns a count of all letter es whether it's upper or lower case in a sentence.

  Define a class called animal that abstracts animals

Define a class called Animal that abstracts animals and supports three methods. Define Bird as a subclass of Animal and change the behavior.

  Create a list that contains the months of the year

Create a list that contains the months of the year? Create a loop to print the month number and name? The response paper should be in APA format.

  Ethical and social interpretation of primary research

Critically evaluate and select appropriate big data analytic algorithms to solve a given problem, considering the processing time available and other aspects

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