Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Code need to be in C# programming language. could you please leave some explanation notes as much as you can? Thank you Create the

The Code need to be in C# programming language. could you please leave some explanation notes as much as you can? Thank you

Create the following classes in the class library with following attributes: 1. Customer a. id number customers id number b. name the name of the customer c. address address of the customer (use structs) d. telephone number 10-digit phone number e. orders collection (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 (use structs) f. cost cost of the order g. order type Possible values are: PhoneOrder, RestaurantOrder h. items collection (array) of order items in the order. Assume that there will be no more then 50 items in the order 3. OrderItem a. Menu item menu item that is 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. Make sure that the object state is correct (Hint: cost). 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

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

2. What is the business value of security and control?

Answered: 1 week ago