Starting from:
$30

$24

Homework 1 Solution




What To Do



This homework requires the student to design a simple application implemented in Java by applying the con-troller pattern, the iterator pattern and the composite pattern. When the application starts, it displays a window containing two buttons and a drawing area. The buttons are labeled \Circle" and \Box," respectively. When one of the buttons is clicked and then the mouse is pressed in the drawing area, the corresponding shape is added to the collection of shapes of the composite. Moreover, all the shapes stored in the composite are repainted on the drawing area. Figure 1 shows a sample window with a circle and a box created.









































































Figure 1: Sample window with a circle and box created










What to Produce and Submit



The student is required to produce and submit the following:




Produce and submit a domain model class diagram (DMCD) for the simple application. The DMCD may contain only a few class but this is ne for this homework.



Produce and submit a design sequence diagram for the simple use case of the application. The design se-quence diagram must apply the controller pattern, the iterator pattern and the composite pattern. It must also clearly separate the presentation (i.e., the graphical user interface) and the business objects. That is, all business-object related processing must take place in the business-object layer, not the presentation layer. Use UML stereotype or UML note to show the patterns you apply.



Produce and submit a design class diagram for the simple application. Use UML stereotype or UML note to show the patterns you apply.



1
Implement the design in Java. You may use Swing or AWT, whichever you prefer. Provide comments in your code to show the patterns you apply.



Compile and run your application. Add a circle, a box, another circle, and another box. Produce and submit the screen shot.






How To Submit



To be announced by the TA before the deadline.









































































































































































2

More products