Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignments. 1. Prepare a class diagram for each group of classes. Add at least 10 relationships (associations and generalizations) to each diagram. Use.

Similar presentations


Presentation on theme: "Assignments. 1. Prepare a class diagram for each group of classes. Add at least 10 relationships (associations and generalizations) to each diagram. Use."— Presentation transcript:

1 Assignments

2 1. Prepare a class diagram for each group of classes. Add at least 10 relationships (associations and generalizations) to each diagram. Use association names and association end name where needed. Also use qualified associations and show multiplicity. You do not need to show attributes or operations. As you prepare the diagrams, you may add classes. Be sure to explain your diagrams. A. School, playground, principal, school board, classroom, book, student, teacher, cafeteria, restroom, computer, desk, chair, ruler, door, swing B. Automobile, engine, wheel, brake light, door, battery, muffler, tail pipe C. Castle, moat, drawbridge, tower, ghost, stairs, dungeon, floor, corridor, room, window, stone, lord, lady, cook

3 2. Add at least 10 attributes and at least 5 methods to each of the class diagrams you prepared in the previous question (question 1)

4 3. Prepare a class diagram from the object diagram in the following figure: 4. Prepare a written description for the class diagram from question 3 Borders Spain:Country name=“Spain” France:Country name=“France” Belgium:Conuntry name=“Belguim”

5 Problem # 1 A simple digital watch has a display and two buttons to set it, the A button and the B button. The watch has two modes of operation, display time and set time. A simple digital watch has a display and two buttons to set it, the A button and the B button. The watch has two modes of operation, display time and set time. In the display time mode, the watch displays hours and minutes, separated by a flashing colon. In the display time mode, the watch displays hours and minutes, separated by a flashing colon. The set time mode has two submodes, set hours and set minutes. The A button selects modes. Each time it is pressed, the mode advances in the sequence: display, set hours, set minutes, display, etc. The set time mode has two submodes, set hours and set minutes. The A button selects modes. Each time it is pressed, the mode advances in the sequence: display, set hours, set minutes, display, etc. Within the submodes, the B button advances the hours or minutes once each time it is pressed. Buttons must be released before they can generate another event. Within the submodes, the B button advances the hours or minutes once each time it is pressed. Buttons must be released before they can generate another event. Prepare a state diagram of the watch. Prepare a state diagram of the watch.

6 Solution of Problem # 1 DigitalWatch Display time do / show hours and minutes Set hours do / show hours Set minutes do / show minutes B / advance minute B / advance hour A A A

7 Assignment Consider a physical bookstore, such as in a shopping mall a. List three actors that are involved in the design of a checkout system. Explain the relevance of each actor b. One use case is the purchase of item. Take the perspective of a customer and list another use case at a comparable level of abstraction. Summarize the purpose of each use case with a sentence. c. Prepare a use case diagram for physical bookstore checkout system d. Prepare a normal scenario for each use case. Remember that a scenario is an example, and need not exercise all functionality of the use case e. Prepare an exception scenario for each use case f. Prepare a sequence diagram corresponding to each scenario in (d)


Download ppt "Assignments. 1. Prepare a class diagram for each group of classes. Add at least 10 relationships (associations and generalizations) to each diagram. Use."

Similar presentations


Ads by Google