Intro to Java Programming I
IT151-1401B-01
Discussion Board 2
Orolobo Alabo George
February 26, 2014
CAR
Private String CarName
Private String CarColour
Private String ChasisNo
Public String Car ( )
Public String getCarName ( )
Public void setCarName ( )
Public String getCarColour ( )
Public void setCarColour ( )
Public int getChasisNo ( )
Public void setChasisNo ( )
Public String toString ( )
The class diagram is a static diagrammatic representation of the static view of an application. Class diagrams are used for visualizing, describing and documenting different aspects of system. Also, Class diagrams are used for the construction of executable code of the software application.
The class diagram gives a description of the attributes and operations of a class and also constraint imposed. In my diagram above for my Car Class, the attributes are the Name, Colour, and Chasis Number, while the operations include the getters and setters in the lower section of the diagram. Class diagrams like this are mainly used in the modelling of object oriented systems because class diagrams are the only UML diagrams that can be directly mapped with object oriented languages.
The class diagram shows a collection of classes, interfaces, associations, collaborations and constraints. It is also known as a structural diagram.
The purpose of the class diagram can be summarized as:
1. Analysis and design of the static view of an application.
2. Describe responsibilities of a system.
3. Base for component and deployment diagrams.
4. Forward and reverse engineering.
The following points are important to note while drawing a class diagram:
References:
UML Class Diagrams. Retrieved from: http://www.tutorialspoint.com/uml/uml_class_diagram.htm
Class Digrams- UML Diagram. Retrieved from: www.uml-diagrams.org/class-diagrams.html