Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a c++ program for a simple online shopping situation. The entities in this

ID: 3641783 • Letter: W

Question

write a c++ program for a simple online shopping situation. The entities in
this scenario include the web shop, customers, products, orders and invoices. The
shop has a list of products available. A customer logs in, selects products and adds
them to his/her order. When the shopping is complete an invoice with unique invoice
number is generated for the order. There are 10 products in this simple example and
they should be stored in an array. Products can be added and deleted from an order.
Only one customer at a time need be considered.

the program should begin by offering a login prompt on screen. Once a username
and password is accepted a customer can be created. At this point a menu of products
should appear on screen. These products should either have been loaded from the file
or have been hard-coded in the program. The user uses the menu to select products
which are added to the order. A facility to quit this menu should be provided. The
order thus far should then be displayed on screen. At this stage there should now be a
facility to delete items in the order. This can be done on the basis of the name of the
product. Once this phase is quit an invoice should be generated and displayed on
screen. The program can then finish or the user logout.

Explanation / Answer

#include #include #include using namespace std; class Order { private: string customer; string country ; string productList[]; int numProducts ; public: void createOrder(Customer); void add(product); void search(string); void delete(string); void display(); }; class Customer { private: string name; string address; public: void createCust(string, string); void customer(string, string); void getName(); }; class Product { private: string name; string model; float price; public: void readRecord(ifstream&); void createProduct(string, string, float); void getPrice(); void displayDetails(); void getName(); }; void displayDetails(product p) { cout