Date post: | 15-Jul-2015 |
Category: |
Technology |
Upload: | amity2j |
View: | 176 times |
Download: | 1 times |
Model is a simplification of reality. A model provides the blueprint for a system
we want to build. Very often, one model may not be sufficient
for a given task, especially if the task is huge. Why we model? Continue
Visualize a system as it is or as we want it to be.
Permit us to specify the structure or behavior of a system.
A template which guides us in constructing a system.
Document the decisions we have made.
UML means Unified Modeling Language. The Unified Modeling Language (UML) is a
graphical language for visualizing,specifying, constructing, and documenting the artifacts of a software-intensive system.
The UML offers a standard way to write a system's blueprints, including conceptualthings such as business processes and system functions as well as concrete things suchas programming language statements, database schemes, and reusable softwarecomponents.
Class diagram Object Diagram Use Case Diagram Sequence Diagram Collaboration Diagram Statechart diagram Activity Diagram Component Diagram Deployment Diagram
A class is a set of objects that share the same attributes, operations, relationships, and semantics.
A class is represented by a rectangle in UML. It contains the class name as the header. It contains its data members and member
functions as well, sometimes with the associated data types.
Student-rollno :int-name :string-marks :float+ <<constructor>>Student(r:int,n:string,m:marks)+print()
--initialize each object of student class--print the details
NAME
ATTRIBUTES
OPERATIONS
RESPONSIBILITIES
class student{
int rollno;char name[20];float marks;public:student( int
r, char n[20],float m);
void print();}
Frozen data members : They are data members which cannot be modified .
Multipliers: It refers to the number of instances of a particular class or attribute.
Dependencies: Relations “using” relations among classes
Generalizations: Typical inheritance relations Associations: Structural relations among
objects
Student#rollno :int#name :string#marks :float+ <<constructor>>Student(r:int,n:string,m:marks)+print()
--initialize each object of student class--print the details
gradstud-degree: string
+ getdeg()+put()
Scope simply refers to the number of copies of a data member for a class.
If there is only one instance for the whole class, it is called classifier scope.
If each instance has a separate copy, it is called instance scope.
Student
-rollno :int-name :string-marks :float
+ <<constructor>>Student(r:int,n:string,m:marks)+print()
--initialize each object of student class--print the details
+ classno :string
Classifier Scope : Note it is underlined
Instance Scope : Note, not underlined
Abstract classes and functions are specified by making them italicized.
Class with no children is labelled leaf. Class with no parents is labelled root. Typically, child functions override parent
functions, and are called polymorphic. If it is not so, label it as a leaf function.
Member functions can be specified with their return types.+ isFull() : int
Arguments in the argument list can also be specified. in :input argument, cannot be changed out : output argument inout :input parameter, can be changed
Functions can also have associated properties like isQuery, sequential, guarded and concurrent.
Class Name
[visiblility] name [multiplicity][:type][=initial value] [{property}]
[visibility]name [(parameter list)][:return type] [{property}]