Sales Records Management System in Python Assignment

Download Solution Order New Solution

Assignment Task

Introduction

This is an individual assignment and it must be completed independently. The assignment consists of three questions, covering materials from Topic 1 to Topic 11. These questions are incremental in nature, ie, a later question relies on a previous question. You should complete these questions in their natural order.

Please note that one of the objectives of this unit is to develop skills in self-learning and research. This assignment deliberately includes questions that require you to conduct independent research to come up with an answer.

The assignment will be marked out of 100 marks, including 10 marks allocated to the quality of presentation (including formatting and layout) and adherence to Documentation and Submission Requirements. To achieve good marks you must strictly adhere to the Documentation and Submission Requirements.

The marks you will receive for this assignment depend on the following two aspects:

  • How many required features are completed and are fully working
  • The quality of your solutions rather than just producing the correct results

You will receive a top grade only if your assignments meet all requirements with outstanding quality.

You should try each question as soon as the relevant topic is covered, not wait until all relevant topics are covered. If you don't you may find that you do not have enough time to complete the assignment. For example, the first question relies on the materials covered in the first 6 topics. The second question relies on the materials covered in the first 7 topics, and the last question relies on the materials covered in the first 11 topics.

Question 1: A simple sales records management system

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 manage the sale records of the company and implement the program in Python programming language.

These sales records are stored in two CSV files, on for the customer details and the other for the records of sales to these customers.

The first file contains the customer records. Each customer record consists of following information: the customer id cust_id, the customer's name, the customer's postcode, the customer's phone number. In each record, only the customer's ID and name are required. Other details are optional (empty). Note, the customer id is a 6-digit number starting from 100000.

The second file contains the sale records. Each record contains the details of one sale, including date, trans_id, cust_id, catetegory, and value. Note the transaction id (trans_id) is a 9-digit number starting from 100000000.

Design a program and implement it in Python programming language that would load the customer records and sales records from two CSV files and then store the customer and sales details in a single data structure in the computer memory.

The two file names/paths can be optionally supplied as two command line arguments, with customer records file comes first, followed by the sales records file.

The program repeatedly displays a menu to allow the user to perform the following operations:

  1. Load customer and sales records from two CSV files and store them in a single data structure. If there is already a data structure containing customer and sales records in the memory (either via the two CSV files from the command line or from a previous load customer and sales records menu option), the new customer and sales records from two new files would replace the existing customer records and the sales records in the computer memory. The program should prompt the user to provide the names/paths of the two new CSV files.

  2. 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 or cancel the operation. If the user decides to overwrite the file, save the customer records to that CSV file. The saved customer records file should have the same structure as that of the sample customer records file customers.csv. If there are no customer and sales records in the memory, inform the user and return to the main menu.

  3. Save all sales 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 or cancel the operation. If the user decides to overwrite the file, save the sales records to that CSV file. The saved sales records file should have the same structure as that of the sample sales records file salles.csv. If there are no customer and sales records in the memory, inform the user and return to the main menu.

  4. Quit the program.

This IT Computer Science has been solved by our PhD Experts at My Uni Paper.

Get It Done! Today

Country
Applicable Time Zone is AEST [Sydney, NSW] (GMT+11)
+

Every Assignment. Every Solution. Instantly. Deadline Ahead? Grab Your Sample Now.