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.


Lab Objectives

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

Construct the use cases for representing the functionality of a simple microwave. The microwave will have buttons for entering the amount of time to cook the food, a start button, and a cancel button.

Submit your answer in the space below


 

P2. State Diagrams

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.

Provide all code in the space below.


 

R2. Software Packages

Research the Internet for software applications capable of generating UML diagrams. Find at least five such programs and include information concerning their capability, OS platform, and price. You will find that taking the time to use such software before beginning a large project can greatly reduce your development time and can prevent headaches later on.

Provide your answer in the space below.


 

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

In this problem, you will create class definitions, without implementation, based upon the class diagrams constructed in Problem P1.

Submit all code in the space below.


Do not forget to send your answers when you are finished.