You are on page 1of 35

lOMoARcPSD|24624772

R19 UML LAB Manual

Computer Science (Anna University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)
lOMoARcPSD|24624772

UNIFIED MODELING LANGUAGE LABORATORY


Course Code: CS4104

IV B.Tech. I Semester

LABORATORY MANUAL

Prepared By
Mrs.Ch Sujana
M.Tech.
Assistant Professor
Department of Computer Science and Engineering

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


ADITYA COLLEGE OF ENGINEERING AND TECHNOLOGY
Aditya Nagar, ADB Road, Surampalem - 533 437, East Godavari District, Andhra Pradesh,
India
Phone (India) : 0884-2326212,9959176665
Website: http://www.acet.ac.in/
Fax : 0884-2326203
E-mail : adityacollegeenggtech@gmail.com
office@acet.ac.in

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

DEPARTMENT VISION
To become a center for excellence in Computer Science and Engineering education and innovation.

DEPARTMENT MISSION

1. Provide state of art infrastructure.


2. Adapt Skill based learner centric teaching methodology.
3. Organize socio-cultural events for better society.
4. Undertake collaborative works with academia and industry.
5. Encourage students and staff self-motivated, problem solving individuals using Artificial
Intelligence.
6. Encourage entrepreneurship in young minds.

PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

PEO1:
Capability to design and develop new software products as per requirements of the various domains and
eligible to take the roles in various government, research organizations and industry.
PEO2:
More enthusiastic to adopt new technologies and to improve existing solutions by reducing complexity
which serves society requirements as per timeline changes.
PEO3:
With good hands on basic knowledge and ready improve academic qualifications in India or abroad.
PEO4:
Ability to build and lead the team to achieve organizational goals.

PROGRAM OUTCOMES (POs)

PO1: Engineering Knowledge : Apply the knowledge of mathematics, science, engineering fundamentals,
and an engineering specialization to the solution of complex engineering problems.
PO2: Problem Analysis : Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
PO3: Design / Development of Solutions : Design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration for the
public health and safety, and the cultural, societal, and environmental considerations.
PO4: Conduct Investigations of Complex Problems: Use research-based knowledge and research methods
including design of experiments, analysis and interpretation of data, and synthesis of the information
to provide valid conclusions.

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

PO5: Modern Tool Usage : Create, select, and apply appropriate techniques, resources, and modern
engineering and IT tools including prediction and modeling to complex engineering activities with
an understanding of the limitations.
PO6: The Engineer and Society : Apply reasoning informed by the contextual knowledge to assess societal,
health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice.
PO7: Environment and Sustainability: Understand the impact of the professional engineering solutions in
societal and environmental contexts and demonstrate the knowledge of and need for sustainable
development.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the
engineering practice.
PO9: Individual and Teamwork: Function effectively as an individual, and as a member or leader in diverse
teams, and in multidisciplinary settings.
PO10: Communication: Communicate effectively on complex engineering activities with the engineering
community and with society at large, such as, being able to comprehend and write effective reports
and design documentation, make effective presentations, and give and receive clear instructions.
PO11: Project Management and Finance : Demonstrate knowledge and understanding of the
engineering and management principles and apply these to one’s own work, as a member and
leader in a team, to manage projects and in multidisciplinary environments.

PO12: Life-Long Learning: Recognize the need for and have the preparation and ability to engage in
independent and life-long learning in the broadest context of technological change.

PROGRAM SPECIFIC OUTCOMES (PSOs)

PSO1:
The ability to design and develop computer programs for analysing the data.

PSO2:
The ability to analyze data & develop Innovative ideas and provide solution by adopting emerging
technologies for real time problems of software industry.

PSO3:
To encourage the research in software field that contribute to enhance the standards of human life style and
maintain ethical values..

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

TABLE OF CONTENTS

Experiment Page
Experiment Name
Number No.

1 Familiarization with Rational Rose or Umbrello Environment 6


a) Identify and Analyze events
2 b) Identify Use Cases 14
c) Develop Event table
a) Identify & analyze domain classes
b) Represent use cases and a domain class diagram using Rational Rose
3 16
c) Develop CRUD matrix to represent relationships between use cases
and problem domain classes
a) Develop Use case diagrams
4 b) Develop elaborate Use case descriptions & scenarios 19
c) Develop prototypes (without functionality)
a) Develop system sequence diagrams and high-level sequence diagrams
for each use case
5 b) Identify MVC classes I objects for each use case 22
c) Develop Detailed Sequence Diagrams / Communication diagrams for
each use case showing interactions among all the three-layer objects
a) Develop detailed design class model(use GRASP patterns for
6 responsibility assignment) 25
b) Develop three-layer package diagrams for each case study
a) Develop Use case Packages
b) Develop component diagrams
7 c) Identify relationships between use cases and represent them 29
d) Refine domain class model by showing all the associations among
classes
Develop sample diagrams for other UML diagrams - state chart diagrams,
8 33
activity diagrams and deployment diagrams

4 Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Experiment 1:

Aim: Familiarization with rational rose

PROCEDURE: A Tour of Rational Rose Environment

Application Window: a title bar, tool bar, menu bar, and a work area for Displaying
•toolbox, browser, document window, diagram window,
and specification window
Browser: a window with navigation tool for viewing diagrams and many other
•model elements

Documentation Window: for preparing text information to describe model elements


•or relationships

Diagram Windows

Overview Window: can be showed through put the mouse pointer over hand icon

Other windows such as Log, Edit, can be access through View on menu bar

5 Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Specification
Window

b) Creating a simple application (Hello.java) Step 1: Run Rational Rose Enterprise

6 Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Step 2: Create a Use Case Diagram

1. Click on Use Case View > Main

2. From the menu bar select Tool - > Create -> Use Case
3. Select the Actor from the Toolbox and place it into the Use Case Diagram
4. Right click on the Actor to see the pop-up menu, and then select Open Specification menu
5. Select the Use Case from the Toolbox and place it into the Use Case Diagram
6. Right click on the Use case to change the name to HelloUML

Actor HelloUML

Step 3: Create Hello Class Diagram (classes, attributes, and operations)

1)Click on Use Logical View > Main

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

2. Create a new class called <Hello=


- Tools -> Create- > Class
- Select the Class icon (rectangle box symbol) from the Toolbox
- Place a class to the workspace of the Class Diagram
- Type in a desired class name: <Hello=
- Right click the new class diagram and select <Open Specification=
- View the class name in the name box: Hello - Select <class= in the Type combo box

3. Add Attributes to the Hello class


- Right click the Hello class to select New Attributes from a dialog box
- Accept the default name, and hit enter
- Right click the Hello class again to select Open Specification - The window called Class Specification for
Hello is then displayed; change the attribute name to message; select Type as: String; specify Initial Value
with a pair double quotes as: <Hello UML=; set Export Control to: private

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

4. Add Operations to the Hello class


- Right click the Hello class to get an dialog box
- Select New Operations, and give a new method name as getName, then hit Enter key to enter another
method name as Hello
- Doubleclick the getName method to display Operation Specification menu for getName dialog box
- Add return type as: String; add some information on this operation method to Document text box

5. Change Operation Specification for Hello method


- Right click on the class diagram Hello to select Operation Specification for showing Class Specification
for Hello
- Select Implementation radio button in the Export Control
- Verify the Hello class diagram is the same as shown below.

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Hello
message : String = "Hello
UML"
getName() Hello()

Step 4. Create the Test Class Diagram


1. Select Class icon from the Toolbox
2. Place a class into the workspace Class Diagram, and give the class name: Test
3. Right click on the Test class, and select New Operations

10

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

4. Add two methods: main and Test

Step 5. Object Instantiation


1. Select the dash line icon (Dependency or instaintiates)
2. Draw the line starting from the Test to Hello to make an object instantiation

11

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Result: The Design was successfully completed.

12

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Experiment 2:

a) Identify and Analyze events


b) Identify Use Cases
c) Develop Event table

CASE STUDY: LIBRARY MANAGEMENT SYSTEM

a) Aim: Identify and analyze events


The flow of events of a usecase contains the most important information derived from usecase
modeling work.it should describe the usecases flow of events clearly enough for an outsider to easily
understand it.Remember flow of events should present what the system does,not how the system is design
to perform the required behavior.

Guidelines for the contents of the flow of

events are,

1)Describe how the usecase starts and ends.

2) Describe what data is exchanged between the actor and the usecase

3) Do not describe the details of the user interface,unless it is necessary to understand the behavior of the system.

b)Aim: Identify Use Cases

Procedure:

a) Register member:

here the members who can access the library are registered based on the id nos.

b) issue book:

b.1) verify member:

before issuing book the specific member is verified whether he/she is registered or not

b.2) check availability or book:

after verifying the person then the availability of book which he/she selected is checked whether
the book is available or not

after verifying & checking the book is issued

c) Return book:
13

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

After the specific time is over the person should return book during returning

c.1) Calculate fine:

The fine is calculated


d) Enquiry:

In this the member is checked if fine is existed or not

e)Maintaining books:

This is done by the librarian that how many books are present,person or members login id and their
registrations etc.

Graphical representations:

C) Aim: Develop event table:

Usecase Description
Register member The members who can access the library are registered based on the
ids
Issue book-verfy member Before issuing the book the specific member is verified whether
he/she is registred or not
Check availability of book Check the book is available or not
Return book After the specific time is over the person should return
Calculate fine The fine is calculated if their fine

14

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Enquiry In this the member is checked if fine is existed or not


Maintaining books This is done by checking the books

Experiment 3:

a) Identify & analyze domain classes


b) Represent use cases and a domain class diagram using Rational Rose
c) Develop CRUD matrix to represent relationships between use cases and problem domain
classes

a) Aim: Identify and analyze domain classes

15

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

b) Aim: Represent class diagram for library management system


class diagram

16

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Use case diagram

c) Aim: Develop CRUD matrix to represent relationships between usecase and problem domain classes
The CRUD Matrix is an excellent technique to identify the Tables in a database which are used in any User
interaction with a Web Site. CRUD means Create, Read, Update or Delete' and the CRUD Matrix
identifies the Tables involved in any CRUD operation.

Entity/Functio Libraria Tran Study Magazin Membe


Book Journals Bill Student faculty
n n saction Books es r record
Register member UC, D
Enquiry C R R R
Issue Book C R R R R
Verify Book R
Verify Member
Check Availability R R R R R R R
of Book
Return Book R R C C
Calculate Fine C C R R
17

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Maintain Books C

Result: The Design was successfully completed.

Experiment 4:
AIM:
a) Develop Use case diagrams
b) Develop elaborate Use case descriptions & scenarios
c) Develop prototypes (without functionality)

a) Develop Use Case Diagrams

18

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

b) Develop elaborate Use case descriptions & scenarios

Designing use case diagram for the library management system. Some scenarios of the system are as
follows :
1. User who registers himself as a new user initially is regarded as staff or student for the library system.
• For the user to get registered as a new user, registration forms are available that is needed to be
fulfilled by the user.
• After registration, a library card is issued to the user by the librarian. On the library card, an ID is
assigned to cardholder or user.
2. After getting the library card, a new book is requested by the user as per there requirement.
3. After, requesting, the desired book or the requested book is reserved by the user that means no other
user can request for that book.
4. Now, the user can renew a book that means the user can get a new due date for the desired book if
the user has renewed them.
5. If the user somehow forgets to return the book before the due date, then the user pays fine. Or if the
user forgets to renew the book till the due date, then the book will be overdue and the user pays fine.
6. User can fill the feedback form available if they want to.
7. Librarian has a key role in this system. Librarian adds the records in the library database about each
student or user every time issuing the book or returning the book, or paying fine.
8. Librarian also deletes the record of a particular student if the student leaves the college or passed out
from the college. If the book no longer exists in the library, then the record of the particular book is
also deleted.
9. Updating database is the important role of Librarian.

c) Develop prototypes (without functionality)

OBJECTIVE:
To satisfy the user needs and for easy understanding of the system to the user. User can easily find books
in online and work efficiently.

APPROACH:
our aim is to manage the book lovers with their taste of satisfaction. Choice of selection of books can be
made from the virtual representation with our initiative. We help you to figure out the estimated budget for
the booking.

USER GOALS:
Find books and receive books soon. Good guidance is expected. Navigate efficiently.

REQUIREMENTS:
Book entry where we can store the details of the books. book issue which is used to track of book issue
details. Need to see the online book recommended status. The system need to be reliable. Web pages are
loaded within seconds.
19

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

PROTOTYPE:

Features for library management system

Navigation Map

20

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Experiment 5:
AIM:

a) Develop system sequence diagrams and high-level sequence diagrams for each use case
b) Identify MVC classes I objects for each use case
c) Develop Detailed Sequence Diagrams / Communication diagrams for each use case showing interactions
among all the three-layer objects

a) Develop system sequence diagrams and high-level sequence diagrams for each use case

21

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

b) Identify MVC classes I objects for each use case


• The Model-View-Controller (MVC) is an architectural pattern that separates an application into three
main logical components: the model, the view, and the controller.
• MVC is one of the most frequently used industry-standard web development framework to create
scalable and extensible projects.

b) Aim: Identify MVC Classes:


View Model Controller

ILibrarian Member Record Book

Transaction Journals

Bill Magazines
Study Books

22

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

c) Develop Detailed Sequence Diagrams / Communication diagrams for each use case showing interactions
among all the three-layer objects

23

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Experiment 6:
AIM:

a) Develop detailed design class model(use GRASP patterns for responsibility assignment)
b) Develop three-layer package diagrams for each case study

a) Develop detailed design class model(use GRASP patterns for responsibility assignment)

• GRASP stands for General Responsibility Assignment Software Patterns

• A design pattern systematically names, motivates, and explains a general design that addresses a recurring design
problem in object-oriented systems.

• GRASP guides in assigning responsibilities to collaborating objects.

• 9 GRASP patterns
• Creator
• Information Expert
• Low Coupling
• Controller
• High Cohesion
• Indirection
• Polymorphism
• Protected Variations
• Pure Fabrication

Member Record/Members requests for book and also responsibility assigned for Book i.e., information expert,
patterns.

Librarian creates transaction and also responsibility assigned for transaction i.e.,Creator, information expert,
patterns.

24

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

b) Develop three-layer package diagrams for each case study

ATM/ Banking/ Library/Hospital management systems

Package Diagrams

Package diagram is used to simplify complex class diagrams, you can group classes into packages. A package is a collection
of logically related UML elements.

The diagram below is a business model in which the classes are grouped into packages:

• Packages appear as rectangles with small tabs at the top.

• The package name is on the tab or inside the rectangle.

• The dotted arrows are dependencies.

• One package can depend on another package.

25

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

ATM System

Banking System

26

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Library management system

Hospital management system

27

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Experiment 7:
AIM

a) Develop Use case Packages


b) Develop component diagrams
c) Identify relationships between use cases and represent them
d) Refine domain class model by showing all the associations among classes

a) Develop Use case Packages

28

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

b)Component Diagrams

29

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

c) Identify relationships between use cases and represent them

30

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

d) Refine domain class model by showing all the associations among classes

Result: The Design was successfully completed.

31

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Experiment 8:
Develop sample diagrams for other UML diagrams - state chart diagrams, activity diagrams and
deployment diagrams

State Chart diagram for LMS

32

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Activity diagram for LMS

33

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)


lOMoARcPSD|24624772

Unified Modeling Language Laboratory

Deployment diagram

Result: The Design was successfully completed.

34

Downloaded by Rishyanth Reddy (rishyanthreddy101@gmail.com)

You might also like