Question: The Code need to be in C# programming language Create the following classes with following attributes: 1. Customer a. id number customers id number b.

The Code need to be in C# programming language

Create the following classes with following attributes:

1. Customer

a. id number customers id number

b. name the name of the customer

c. address address of the customer

d. telephone number

e. orders (array) of orders Assume that there will be no more than 50 orders per customer

2. Order

a. order id order identification number

b. customer customer that made order

c. order time date the order is made

d. delivery time - date when the order is delivered

e. delivery address address where order is to be delivered

f. cost cost of the order

g. order type Possible values are: PhoneOrder, RestaurantOrder

h. items array of order items in the order.

3. OrderItem

a. Menu item nameitem name in the order

4. MenuItem

a. name name of the menu item

b. description description of the menu item

c. base cost cost of the item without any extras

Implement all 4 classes and provide the following:

1. Appropriate fields

2. Appropriate properties for the fields making sure the integrity and consistency of the created objects

3. Appropriate constructors (a minimum of 1 in addition to the default constructor)

4. Method GetInfo() that returns a string with the information contained within the fields of an instance

5. An id number for customer must be unique

6. An order number for order must be unique

7. Add following methods for the classes:

a. Customer

i. CreateOrder creates new order for the customer. Make sure the corresponding properties are updated accordingly

b. Order

i. AddOrderItem adds the menu item to the order.

ii. Deliver - updates the delivery time with current time

iii. Delivered (property) that is true if the order is delivered.

8. You can add any additional methods that may be needed.

9. In the main() method, test that all class members work correctly. User input is not needed - use the literal constants. Make sure you use at least one object initializer.

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!