Assignment #2
Due: Thurs, Feb 8, at the beginning of class
Objective
To gain practice in the notation of UML class diagrams.
Task:
For this assignment, you will draw the following two class diagrams, based
on a mixture of exercises 2-6, 2-7, 2-9, and 2-10 in the textbook (page 72).
Diagram 1
This is based on exercises 2-6, 2-7, and 2-9
- Draw a class diagram representing a book defined by the following
statement: "A book is composed of a number of parts, which in turn are
composed of a number of chpaters. Chapters are composed of
sections."
- The diagram should create appropriate classes and show the
relationships between the classes
- The relationships should show appropriate multiplicities
- The diagram should also include the following attributes:
- a book includes a publisher, publication date, and an ISBN
- a part includes a title and a number
- a chapter includes a title, a number, and an abstract
- a section includes a title and a number
Diagram 2
This is based on exercise 2-10. Take the diagram you drew in part 1, and
create a new modified version of the diagram based on the following:
- Note that parts, chapters, and sections all have title and number
attributes.
- Add an abstract class to your diagram, along with an inheritance
relationship, so that these common attributes are factored out (into the
abstract class)
Submitting
- You may use any drawing program or CASE tool to do the drawing.
Although not a requirement, it is suggested that you try out the Rational
Rose demo program, since you can download it freely from the course web
site
- Print out a hard copy of your diagrams, and hand them in by the due
date in class (you can hand in at lecture or in recitation)
- Make sure your name is on all pages handed in