Homework 2
cs561 Software Engineering
5 points
Due Friday, Oct. 25 at the beginning of class
Submit your assignment (typed or scanned) to the eCompanion dropbox for Homework 2.

1. (1 point) Create UML diagrams for the following classes being sure to include the proper attributes, any relevant methods described below, any associations (has-a), and any generalization (is-a) relationships:

a) Classes called Course, CourseSection, and Student.  Note that a Student may take many Courses and enroll in only particular sections of a Course.  Note that a CourseSection has a section number and exactly one Course.  It should also contain a list of students enrolled in a particular section number of a Course.

b) Classes called Shape2D, Triangle, Rectangle, Hexagon, and Parallelogram.  Be sure to take note of which shapes are two dimensional and which shapes are generalizations of other shapes.  Include a method to compute the area of a shape in your diagrams.

2. (2 points) Create UML diagrams for the following classes being sure to use an appropriate design pattern and indicate which one you are using:

a) Classes called Manager, Employee, and AdministrativeAssistant where Managers can supervise one or more AdministrativeAssistants and zero or more Managers.

b) Classes called WorldMapData and WorldMapView, where a viewing object should be able to access and display map data, but map data may be occasionally updated.

c) Classes called Queue and LinkedList, where a linked list has methods as described by the Java SE 7 documentation and a Queue is built using a linked list and its methods.  Note that the Queue must have at least four appropriately named methods aside from any constructors you create.

d) Classes called Person, MainActor, SupportingActor, ActorRole, ScreenActorRole, and VoiceActorRole.  Note that MainActor and SupportingActor have Person as a base class, and ScreenActorRole and VoiceActorRole have ActorRole as a base class.  Finally, note that a Person may have an ActorRole.

3. (2 points) Provide written use case descriptions for one possible action from parts b) and d) from problem 2.  Your written use cases must include the following information: a name, at least one precondition, at least one postcondition, a goal, and at least 6 steps/substeps each.