Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need Help Please !! i give you like and nice comment if you answer all questions please This Project consists of designing an online store

Need Help Please !! i give you like and nice comment if you answer all questions please

This Project consists of designing an online store application called EasyStore.

This project makes it possible to approach object-oriented programming (OOP) by creating a certain number of simple classes which will interact with each other. .

Steps to follow Create a git repository to be able to do "serious" versioning Create a Makefile to be able to efficiently compile code Think about what you want to do. Break down the problem into a sub-problem Write the code necessary to solve a sub-problem. Always make sure that the created objects are valid. Validate the code.

The management of this store requires the creation of several classes: Product, Customer, Order.

A Product can consist of the following information:

A title (eg: "PS4"), A description (eg: "Sumsung brand game console"), An available quantity (ex: 22), A unit price (ex: 270 ). A Client can consist of the following information:

A first name (eg: "Nnike"), A name (eg: "Starf"), A shopping cart, that is to say an array of selected products that are awaiting validation for the order. Once the order is validated, the shopping cart is automatically emptied. An Order may consist of the following information:

A customer, A table of products ordered, A status of the order (Ex: delivered / not delivered). Be careful, for each of its classes, you must make sure that we can identify the objects. Some of these classes may need additional identifiers. Typically, the Customer class requires a unique identifier because the name / first name is not unique (homonyms).

The EasyStore store is represented in the form of a Store class comprising the following elements:

An array of Products (std :: vector _products) An array of Customers (std :: vector _clients) An array of Orders (std :: vector _orders)

For each of the questions, it is assumed that all the parameters passed to the class constructors are valid, which makes it possible to create the objects. On the other hand, it is essential to ensure beforehand that these parameters are correct. For example, before validating an order, it is necessary to verify that the product is available.

Creating classes Question 1: Creation of the Store class 1.a) Create the Store class with its member variables, its constructor

1.b) Write a main program allowing to create an (empty) object of the store type.

Question 2: Creation of the Product class 2.a) Create the Product class with its member variables, its constructor and its getters functions. Add a method to modify the quantity available.

2.b) Overload the << operator to be able to display a product.

Question 3: Adding functionality to Store 3.a) Add to the Store class a method or a helper function allowing to add a new product to the store.

3.b) Write a method or a helper function allowing to display on the screen all the products referenced in the store.

3.c) Write a method or a helper function allowing to display on the screen a product selected by its name.

4.c) Write a method or a helper function allowing to update the quantity of a product selected by its name.

Question 4: Creation of the Client class 4.a) Create the Customer class with its member variables (identifier, first name, last name, shopping cart) and its getter functions.

4.b) Add a method or a helper function allowing to add a product to the shopping cart.

4.c) Add a method or a helper function to empty the shopping cart.

4.d) Add a method or a helper function allowing to modify the quantity of a product added to the shopping cart

4.e) Add a method or a helper function to remove a product from the shopping cart.

4.f) Overload the << operator to be able to display all the customer's information (including the products in the shopping cart.

Question 5: Adding functionality to Store 5.a) Add to the Store class a method or a helper function allowing to add a new customer to the store.

5.b) Write a method or a helper function allowing to display on the screen all the customers of the store.

5.c) Write a method or a helper function allowing to display on the screen a customer selected by his name or his identifier.

5.d) Write a method or a helper function allowing to add a product to a customer's shopping cart.

5.e) Write a method or a helper function allowing to remove a product from a customer's shopping cart.

5.f) Write a method or a helper function allowing to modify the quantity of a product in a customer's shopping cart.

Question 6: Creation of the Command class 6.a) Create the Order class with its member variables (customer, products purchased, status).

6.f) Overload the << operator to be able to display all the information of the command.

Question 7: Adding functionalities to Store 7.a) Add to the Store class a method or a helper function used to validate an order

7.b) Add a method or a helper function to update the status of an order

7.c) Add a method or a helper function allowing to display all the orders placed.

7.d) Add a method or a helper function allowing to display all the orders of a given customer.

Question 8: Subsidiary questions 8.a) In the main program, create a menu allowing you to select the action to be taken: store management, user management, order management. For each of the actions, create a submenu with the corresponding options. For example, for store management, add orders: add a product, display products, update quantities, etc.

8.b) Write the code necessary to record and read data (products, customers and orders) in files.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions