Professional Documents
Culture Documents
Lab 2
Requirements:
Create the following classes in Console (.NET framework) application with following attributes:
1. Customer
a. id number – customer’s id number
b. name –the name of the customer
c. address – address of the customer (use string)
d. telephone number – 10-digit phone number
e. orders – collection of orders
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 string)
f. cost – cost of the order
g. order type – Possible values are: PhoneOrder, RestaurantOrder
h. items – collection (array) of the order 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
Page 1 of 2
COMP123-Programming II
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).
6. You can add any additional methods that may be needed.
7. [10 points] 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.
Submission: Submit the compressed solution folder of this lab to Lab2 drop box individually
by drop box deadline.
Page 2 of 2