UML: Usecase Diagrams and Class Diagrams

Uses Cases and Class Diagrams

The use cases and class diagrams are very useful in order to plan and designing any project. Before understanding use cases and diagrams we need to know regarding UML.

UML can be abbreviated as Unified Modeling Language, which is used in order to provide a common modeling for various
problems/projects which are platform independent, technology independent and support purely object oriented programming languages.

The use cases can be defined in simple word as scenario in which the given problem solution will be used and what are all the cases that may arise while using the project/solution.

The use cases helps the system design and development easier by providing the necessary and mandatory cases that are the users of any project.  The use cases can be represented by using standard notations.  The following are the notations which are used in order derive the use cases most commonly.

image001

In order to understand the use cases in better way, let me explain an example, consider the video conference system as a problem/project, in order to implement this project first I need to gather the information from user/client properly once the required information is gathered by using any of the information gathering techniques, I can start on writing the use cases for video conference system.

The use cases are formed or designed by considering the main functional requirements of the system not mapped one-to-one and it shows what behavior the actor can expect and not how the system will work to provide the service.

In order to write the use cases we need to know two things properly in use cases

1.  Actor,the external agent who will make use of the system

2. Service provided by the System

In the video conference system the actors are the persons who will make use of the system by connecting to the system, and the services provided by the system are login authentication, video conferencing, video recording, text messaging.  These are all the main functional requirements which are identified in order to develop the video conferencing system.  The following are the different use cases those can be derived or drawn by considering the video conferencing system and the services provided by the system.

The following are the example/illustrative use case diagrams with respect to web based video conferencing system, which is used for video conferencing over the internet.

  • Login Authentication
  • Video Conferencing
  • Chat: Text Messaging
  • Video Recording

 

  image002

 

 image003

 

image0041

image0052image006 

The use case diagrams does have extension, aggregation and interface concept those can be represented pictorially as above.


 

Class Diagrams

                The class diagrams are diagrams which are used in order to represent the classes used or to be used in any solution
implementation using notations.  The class diagrams makes the understandability of the project flow and the pictorially represents the different classes used and how they were connected to each other  and which are all the classes that depends on the other classes can be represented.

The class diagram can be represented by following notation and it does mainly have 3 parts first part is the name of the class, the second box or part is declaration of members or variables which are used in the class, the third part/box will be list of all the methods which are implemented in the class in order to perform the operations on class data members.

The following notations are used in drawing class diagrams.

image0071

The Class diagrams can be used to represent all the available variants of classes in Object oriented languages.

The example class diagram used in web based video conferencing system.

image008

In this diagram, as we can see the class is of type public and class name is enter_002dconf2_jsp used in web based video conferencing system, the member of the class is _dependants of  type Vector and access mode is private.

image009

The two methods are defined of type public in order to perform the required operation, the getDependants() ,
method will get all the necessary dependents needed to start the video conferencing service, and the second method will _jspService() will start the service and write the required information on to the browser, if the required dependents are present then the client application will run through which the user can able to perform video conferencing, if not then the
necessary information will be written on to the browser.

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)