80 likes | 404 Views
Week 13: Wrap-up Refining Class Diagram and Implementation. MSIS 670: UML Models. Refining the Class Diagram. From Activity Diagram and Sequence diagram, add the classes needed. Identify more attributes (instance variables) and methods needed.
E N D
Week 13: Wrap-upRefining Class Diagram and Implementation MSIS 670: UML Models
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
Creating Random Access Files Figure 1
Implementation • a Skelton Java code for classes will be created.
A Skeleton Code • Declare public class ClassName • Attributes be its instance variables • Class diagram relationships for object references • Declare methods from third compartment
Step 1: declare class Step 2: define instance variables Step 3: reference to objects Step 4: define methods Figure 2: Example of application skeleton code