Question: asap help in c++ programming pls Write a program that realizes the processing of orders. To do this, use the Order class and the supporting

asap help in c++ programming pls Write a program that realizes the processing of orders. To do this, use the Order class and the supporting classes Customer and Product (see class diagrams):

asap help in c++ programming pls Write a program that realizes the

Special features of the data elements and element functions are:  Each order contains an association (i.e. a pointer) to exactly one customer who initiated this order and any number of associations (i.e. here a vector with pointers) to products that are part of this order.  The constructor of Product sets the data elements product number (number), name (name) and price (price) to externally adopted values.  toString returns all data elements of an object (ie number, name and price) in clear formatting as a string.

 The constructor of Customer sets the data elements customer number, name and address to externally adopted values.  toString returns number, name and address in clear formatting as a string.  The constructor of Order sets customer to the memory address of a customer object taken from outside. In addition, it sets the data element order number (number) for each new order object as follows: The (static) class variable numberCounter is initially initialized to the value 1001. Every time an Order object is created, the current value of numberCounter is transferred to the object variable number; then numberCounter is increased by one.  addProduct adds the memory address of a product in the application program to the products data element.  computeOrderPrice calculates the total price of all products contained in the order object and returns it.  sort sorts the products in products in ascending order according to their product number. The sorting process direct insertion (insertion sort) should be used here.  toString returns the values of all data elements of the Order object in clear formatting as a string; In addition, the string should contain the total price of all products contained in the order object.
 
The application program (main) should test the classes and their interactions. To do this, the following actions should be carried out in sequence (no menu, no user entries!):  Create an array object that contains at least two different Customer objects and an array object that contains at least eight different Product objects.  Create two suitable order objects and add at least three of the existing products to both orders (initially unsorted with regard to the product number).  Sort the two jobs and output them.

ne): Order - numberCounter: int number: int customer: Customer* products: vector + Order (Customer*) + addProduct (Product*): void + computeOrderPrice (): double + sort(): void + toString(): string Customer Product - - number: int name: string address: string + Customer (int, string, string) + toString(): string + number: int name: string price: double + Product (int, string, double) + toString(): string + + Order (Customer*) + addProduct (Product*): void + computeOrderPrice (): double + sort(): void + toString(): string Customer Product - - number: int name: string address: string + Customer (int, string, string) + toString(): string + number: int name: string price: double + Product (int, string, double) + toString(): string +

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!