1. Homepage
  2. Programming
  3. CPT106 C++ Programming and Software Engineering II - Project 3: Online trading systems

CPT106 C++ Programming and Software Engineering II - Project 3: Online trading systems

Engage in a Conversation
ChinaXJTLUCPT106C++ Programming and Software Engineering IIOnline trading systemsC++

CPT106 C++ Programming and Software Engineering II CourseNana.COM

Indiv idual Project Fundamental of class and object CourseNana.COM

Project Number 3 Contribution to Overall Marks 30% Release date 10 April 2023 Submission Deadline 25 May 2023, 23:59 CourseNana.COM

How should the work be submitted? SOFT COPY ONLY ! (MUST be submitted through Learning Mall so that we can run your programs during marking.) CourseNana.COM

Assessment Overview This assessment aims at testing some basic concepts of C++ programming and coding in the software development environment (Visual Studio ). To distribute the workload of the individual project more evenly throughout the whole semester, we divided it into 3 smaller individual projects for you to complete separately. This is the third individual project. CourseNana.COM

What should be submitted? Only your C++ source code file (,cpp) should be submitted to Learning Mall (LM). Your grade will also be given through LM. There are several step s for you to note : CourseNana.COM

  1. You should create a solution named “ CPT106Solution ”. CourseNana.COM

  2. Create a project named “Project 3 ”. CourseNana.COM

  3. Create a CPP file for each class . CourseNana.COM

  4. Create the main function in a CPP file of “123456.cpp” ( 123456 is your student ID ) CourseNana.COM

  5. Include clear comments in your code to make it easy to understand. CourseNana.COM

  6. Only submit the cpp file s to the LMO . CourseNana.COM

  7. ALL programs MUST compile and run in one of Visual Studio envir onments in CourseNana.COM

Online trading systems can help customers buy goods from the I nternet. In this question, you are required to write a program to simulate the trading procedure and allow customers to query and buy some goods. Tasks: (1) Create a Product class with several private member variables, such as product id, product name, product amount and price. ( 5 marks) (2) Create a base class Person with several private member variables, such as person name, gender, mobile number and address. The gender should be an enum. ( 5 marks) (3) Create a subclass Customer based on the Person class. It has extra private member variables, such as customer id, capita l and a vector of products the customer is purchasing. Each customer has 5,000 RMB initial capital. ( 5 marks) (4) Create a subclass Manager based on Person class. The manager has extra private member variables, such as age and title. ( 5 marks) (5) Create a MainPro cess class. It has private member variables, such as a vector of products to save all product information, a vector of customers to save all customers, a manager who can manage customers and products and a customer who is purchasing products. In addition, it also has some functions to output operation menus both for managers and customers to choose from. ( 5 marks) (6) When the program runs, it shows a menu as follows: ( 5 marks) CourseNana.COM

Fig.1. Main operation menu There are two roles in this online trading system (manager and customer). Different roles have different functions. (7) If the input is 1, then move to manager’s menu as follows: ( 5 marks) CourseNana.COM

Fig.2. Manager’s operation menu The manager can add new products, qu ery products, add new customers and query customers. If the user inputs 5, then the program will move to the parent menu shown in Figure 1 (main operation menu). a) Add products: manager can add new products into a product vector so that customers can buy th ese products. ( 5 marks) CourseNana.COM

Fig.3. Operation of adding products The manager can continue to input product id, name, amount and price to create and add new products into the product vector. Duplicated product id cannot be added to the product vector. When the manager input s 0 to stop adding, the manager operation menu will output on the window, and the manager can input another number to do other operations. b) Query products: manager can input a product id to query a particular product or input “*” to list all p roducts in the product vector. Output “No product found!” if there is no particular product. ( 5 marks) CourseNana.COM

Fig.4. Operation of querying products c) Add customers: manager can add new customers to the customer vector. ( 5 marks) CourseNana.COM

Fig.5. Operation of adding customers The manager can input customer id, name, gender, mobile number and address to create and add new customers into the customer vector. Duplicated customer id cannot be added to the customer vector. When the manager inputs 0 to stop adding, the mana ger operation menu will be outputted on the window, and the manager can input another number to do other operations. d) Query customers: manager can input a customer id to query a particular customer or input “*” to output all customers in the customer vector . “No customer found!” will be outputted if there is no particular customer. ( 5 marks) CourseNana.COM

Fig.6. Operation of querying customers e) Move to parent menu: if the manager inputs 5, then the program moves to the main operation menu shown in Figure 1. ( 5 marks) (8) On the main operation menu, if the user inputs 2, then the system will ask the user to input a customer id to confirm which customer will purchase products. If the customer id exists in the customer vector, then the operation menu for customers will be output ted as Figure 7 shows. (5 marks) CourseNana.COM

Fig.7. Customer’s operation menu CourseNana.COM

otherwise, ask users to input a new customer id or a special string “quit” to move to the parent operation menu shown in Figure 8 (it means that you should create at least one customer before you can enter into the customer operation menu and start to purchase products) . CourseNana.COM

Fig.8. Failed to find the customer Id a) Add products into cart: a customer can add products into the cart so that the customer can buy these products. Customer can input p roduct id and the amount he/she wants to buy. The program will show a reminder if the customer does not have enough capital or the amount the customer wants is larger than the available amount of the product. The program should output successful informatio n if the adding operation runs successfully. In addition, the amount of product in the product vector should be deducted accordingly. ( 5 marks) CourseNana.COM

Fig.8. Operation of adding products into cart b) Query products in cart: customers can query all products added i n the cart. The customer can input a specific product id to query one product or input “*” to list all products in the cart. ( 5 marks) CourseNana.COM

Fig.9. Operation of querying products in cart c) Check up: customer can check up the bill for all products in the cart. It will list customer’s id, name, gender and capital, all products in the cart and the total price. ( 5 marks) CourseNana.COM

Fig.10. checking up operation If the cart is checked up successfully, the capital of the customer should be deducted based on the total price of p roducts the customer has bought. CourseNana.COM

(9) Make sure your source code has some comments ( 5 marks) to help us understand and can be compiled successfully ( 15 marks). CourseNana.COM

Marking Scheme Class definition 80% (5% for each member in class es) Comments 5% Correctness & Robustness 15% CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
China代写,XJTLU代写,CPT106代写,C++ Programming and Software Engineering II代写,Online trading systems代写,C++代写,China代编,XJTLU代编,CPT106代编,C++ Programming and Software Engineering II代编,Online trading systems代编,C++代编,China代考,XJTLU代考,CPT106代考,C++ Programming and Software Engineering II代考,Online trading systems代考,C++代考,Chinahelp,XJTLUhelp,CPT106help,C++ Programming and Software Engineering IIhelp,Online trading systemshelp,C++help,China作业代写,XJTLU作业代写,CPT106作业代写,C++ Programming and Software Engineering II作业代写,Online trading systems作业代写,C++作业代写,China编程代写,XJTLU编程代写,CPT106编程代写,C++ Programming and Software Engineering II编程代写,Online trading systems编程代写,C++编程代写,Chinaprogramming help,XJTLUprogramming help,CPT106programming help,C++ Programming and Software Engineering IIprogramming help,Online trading systemsprogramming help,C++programming help,Chinaassignment help,XJTLUassignment help,CPT106assignment help,C++ Programming and Software Engineering IIassignment help,Online trading systemsassignment help,C++assignment help,Chinasolution,XJTLUsolution,CPT106solution,C++ Programming and Software Engineering IIsolution,Online trading systemssolution,C++solution,