C# opgave
Har fået en C# opgave på min skole..Skal lige siges at jeg ikke har nogen erfaring med C# overhovedet, så derfor er jeg her.
Opgaven lyder: (engelsk)
The company Andersen & Asp are receiving orders from customers and handles these orders. As part of an IT-solution you are to develop part of the backend of the system. The system is to handle information about customers, items and orders.
Below is shown (part of) the class diagram for the system:
http://www.gratisimage.dk/image-AD1D_4D74A2DA.jpg
Og her kommer de 3 opgaver hertil:
Exercise 1) The classes Customer and Item:
Firstly implement the classes Customer and Item. Attributes are shown in the class diagram. Add constructors and properties for all attributes, itemNo and custNo should be read-only.
Exercise 2) The class OrderLine
The association to Item is to be implemented by a reference from OrderLine to Item - as shown in the class diagram. The attribute qty is the number of items wanted of the item. Implement class OrderLine.
Exercise 3) The class Order
The association from Order to Customer is to be implemented by a reference from Order to Customer. The aggregation of order lines in Order is to be implemented by a List<OrderLine> in Order. The method AddOrderLine in Order adds an order line to the order. Implement this.
Now a method getTotalPrice is to be implemented on Order. It is to return the total price of the order.
Jeg beder ikke om en fuld løsning, men blot en hjælp til at komme i gang, gerne med lidt hjælp til hvad de forskellige koder i skriver gør.
/Tak