BIG C++ Cay Horstmann & Timothy Budd
Laboratory Notebook Chapter 25 – The Unified Modeling Language
Your name:
Your email address:
Your student ID number:
Once this form has been customized for your institution, you can use this button to send your lab work. Be sure to read the instructions before starting your work.
To gain experience with
· the exploration of the Unified Modeling Language (UML)
· the creation and application of use cases
· how to create and use the various diagram types in the UML
· how sequence diagrams help document the dynamic relationships between classes
P1. Class Diagrams
As this chapter deals primarily with UML, it will be useful for you to practice constructing your own diagrams. Therefore, start by drawing a class diagram showing the relationships among the following classes: Library, Building, Book, Page, Magazine, Shelf, and Employee. Be sure to explain why you connected the classes as you did and remember to include multiplicity information. Use either pencil and paper or special software as instructed to create the diagrams.
Justify your diagram in the space below.
R1. Use Cases
In this problem, you will practice constructing state diagrams. Construct a state diagram appropriate for representing the various states that exist for a vending machine.
R2. Software Packages
P3. Sequence Diagram
In this problem, you will construct a sequence diagram showing the interactions among the following objects: security system controller, window alarm, door alarm, telephone interface device, and police headquarters. The security system controller waits for an alarm message. If someone attempts to gain entry to the house by way of a window or door, the respective alarm will sound and transmit a message to the security system controller indicating that it has been activated. The security system controller then sends a message to the telephone interface. The telephone interface transmits the message to the police station.
Insert all code in the space below.
P4. From Diagram to Code
Do not forget to send your answers when you are finished.