Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 15: Refining Class Diagram and Implementation

Similar presentations


Presentation on theme: "Week 15: Refining Class Diagram and Implementation"— Presentation transcript:

1 Week 15: Refining Class Diagram and Implementation
IFS 410: UML Models Week 15: Refining Class Diagram and Implementation 6/1/2019

2 Refining the Class Diagram
From Activity Diagram and Sequence diagram, add the classes needed. Identify more attributes (instance variables) and methods needed. Modify relationships: e.g., an application class uses a data type, “has a” GUI, etc. Visibility: instance variables = private or protected, methods = public or private A tip for using class diagrams (from analysis to implementation): Don't try to use all the various notations on offer. Start with the simple stuff: classes, associations, attributes, and generalization. Introduce other notations only when you need them. Sort out which perspective you are drawing the models from. If you are in analysis draw conceptual models. When working with software, concentrate on specification models. Draw implementation models only when you are illustrating a particular implementation technique. Don't draw models for everything, concentrate on the key areas. It is better to have a few diagrams that you use and keep up to date than many forgotten, out-of-date models. 6/1/2019

3 Creating Random Access Files
“WriteAccessFile”, “ReadAccessFile”, “UpdateRecord”, and “CreateAccessFile” are applications which extends JFrame interface. Applictaion has a user interface (GUI) of BankUI as a component, which in turn has Button and Field as its own componnets. The application interacts with RandomAccessAccountRecord, which extends AccountRecord (SequentialFile), and thus inherits from it its attributes and methods. Figure 1 6/1/2019

4 Implementation a Skelton Java code for classes will be created.
6/1/2019

5 A Skeleton Code Declare public class ClassName
Attributes be its instance variables Class diagram relationships for object references Declare methods from third compartment 6/1/2019

6 Step 2: define instance variables
Step 1: declare class Step 2: define instance variables Step 3: reference to objects Step 4: define methods Just to illustrate the steps to create a class code, Figure 2 illustrates a sample skeleton code for an application “TransactionProcessor”. Of course this is not complete nor compilable. Figure 2: Example of application skeleton code 6/1/2019

7 Figure 3: Example of GUI skeleton code
6/1/2019

8 Figure 4: Example of file skeleton code
6/1/2019


Download ppt "Week 15: Refining Class Diagram and Implementation"

Similar presentations


Ads by Google