Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Domain Model Class Diagram and UML for the following application with Controller, Iterative, and Composite patterns: The buttons are labeled Circle and Box,

Create a Domain Model Class Diagram and UML for the following application with Controller, Iterative, and Composite patterns:

image text in transcribed

The buttons are labeled Circle and Box, respectively. When one of the buttons is clicked and then the mouse is clicked or pressed in the drawing area, the corresponding shape is painted at the clicked location. As an illustration, Figure 1 shows a sample window with a circle and a box created.

1. Produce and submit a domain model class diagram (DMCD) for the simple application. Hint: The DMCD for this homework assignment contains only a couple of classes, that is, what the application is supposed to draw, not the graphical user interface classes such as windows, drawing area and buttons.

Note: the classes of the domain model should not show the methods, functions or operations. These will be referred to as methods in the rest of this document. Assigning methods to classes should take place during the design phase, that is, object interaction modeling (OIM) and deriving design class diagram (DCD). See the next work item for more information.

2. Produce and submit a design sequence diagram for the Draw Shape use case of the application. This use case begins with the actor/user clicking one of the buttons followed by clicking anywhere in the drawing area. This use case ends with the actor/user seeing the corresponding shape drawn at the clicked location in the drawing area.

The design sequence diagram must apply the controller pattern, the iterator pattern and the composite pattern. Use UML stereotype or UML note to show the patterns applied. Figure 2 illustrates examples of a UML stereotype and a UML note.

Hint:

1. Your design may need to remember which button is clicked so that when the mouse is clicked later in the drawing area the software will know which of the shapes is to be painted.

2. When the mouse is clicked in the drawing area, the clicked location must be captured and used to create the corresponding shape. The shape object created is then added to the composite of shapes.

3. To paint the shape, the drawing area is first cleared, and each of the shapes stored in the composite is called to paint itself at its location.

HW1 GUI Circle Box HW1 GUI Circle Box

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

is curlie a directory?

Answered: 1 week ago