Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 ( 4 0 % ) : Search and manipulation of customer and sales records ( Back to Beginning ) Revised your solution to
Question : Search and manipulation of customer and sales records Back to Beginning
Revised your solution to Question by adding new features in the form of additional menu options:
Add the details of a new customer to the data structure containing customer and salles records. The customer details include the custid 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, which must start from with digits. For convenience to the user, the autogenerated customer id should be displayed after the customer record is successfully added.
Add a new sales record for an existing customer. In this case, the user needs to provide the customer id If the customer id exists, the user can then enter the details of a new sales record, ie date, transid custid catetegory, and value. Note for each sales record, there must be a unque, autogenerated, transaction id for that sales record which starts from with digits. If the user provided customer id does not exist, inform the user that there is no such customer and ask the user to provide a correct id or return to the main menu.
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 caseinsensitive and must allow partial matches, for example, the search string "john" would match "John Smith" as well as "Elton Johns"
Search sales records using a single search string. The search string is compared to customer id date, category and value. Then the program will display the details of all matching sales records. Note: just like searching for customers, search for sales records must be caseinsensitive and allow partial matches.
Display all sales records from a customer using hisher customer id When the customer id is given, the program should display all sales records due to that customer.
Delete a sales record with a given transaction id
Delete a customer with a given customer id together with all sales records due to that customer.
Restrictions:
your design must be modular with at least two modules in addition to the main module in your implementation, each provides some closely related functionality.
in this question, do not use ndarrays to store the customer records or transaction records.
in this assignment, do not use any Data Base Management System or module.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started