Exercise 3 (18.11.-22.11.) |
Reading material for these exercises:
Reading material for the next week:
Tasks
2. Create an object diagram corresponding to your class diagram of the library, describing the following things: John Smith (ID 99999) has borrowed two books: Dostoyevski's Crime and Punishment (ID 12345) and Linnaeus' Species of Plants (ID 67890) on 30th March 2000. At the same time, he has reserved the book Wildlife in Savo (67891), edited by Blossom Hayfield. Jane Jones has borrowed Herman Hesse's Steppenwolf (54321) and another copy of Dostoyevski's Crime and Punishment (12344). In addition, she has reserved Dostoyevski's The Brothers Karamazov
3. Travel agency FarAway needs a system for marketing its products in WWW. The users should be able to view the information and also to make reservations on the trips and to post comments about their trips. Each tour has a description consisting of a general description of the destination and a description of the accommodation choices. The general description contains descriptive text and pictures, the flight schedule and the dates of departures. Each accommodation choice description contains the name and address of the hotel or the apartment hotel, a description of the types of rooms or appartments and their number, the base price for a one week tour (for a room type and a given number of persons), the price of extra beds and their maximum number, and the price for an extra week. Reservations are booked for the selected room type and identified by reservation number. A reservation specifies the name and address of the customer, the names and dates of birth for the travellers, the departure date, the duration of the trip, and the reservation's state of processing. Underline all class candidates in the previous text. Evaluate their suitability for classes based on the following criteria:
4. Complete the class model of task 1 by including attributes and associations. Present the result as an UML class diagram.
5. The products of Alfonso's pizza service include pizzas, sandwiches, salads, pastas and drinks. Each product type may be available in different size of portions. The prices depend on the product and the size of the portion. Accompaniments like carlic, parmesan cheese, and mushrooms are also available. Accompaniments are priced separately from products. Alfonso's product catalog explains in detail what ingredients are used in each product. Accopanients are included in ingredients. All ingredients, such as pizza dough, are not anyhow sold as accompanients. An order may contain many portions each with none or many accompanients.. The information system should take care of the maintaining of the product data and the pricing information. It should also support the processing of the orders. Draw an UML class diagram to describe the information contents of the system. Suplement the above description with the missing details..