OOSE Lab Manual
OOSE Lab Manual
For
Object Oriented Software Engineering
CONTENTS
Page No.
4. Case Study: 8
i. Eastern State University Course
Registration Problem
5. Lab Assignments based on the Case Study
i. Lab Exercise 1 9
v. Lab Exercise 5 11
2
3
Objectives: Object Oriented Software Engineering Lab
The Object Oriented Software Engineering Lab provides a deep insight into
the importance of requirement modeling in the software industry. It will
enable us to learn the Rational Rose tool employed in the software
development life cycle, which makes the process of requirement modeling
easy to understand and implement.
Rational Rose is the tool which will be used for the requirement modeling. It
gives us the environment where the entire process of development can be
specified to its minutest detail. It gives us the facility to design our front-end
process as well as our database structure.
Application Tools
Rational Rose
4
Learning on the successful completion of the course
Rose:
5
Schedule For Different Documents Submission
The objective of the Lab work is to make the student conversant with the
Rational Rose for modeling of Business Applications. During the semester a
CASE STUDY “Eastern State University Course Registration Problem” will
be completely solved in the lab classes with the assistance of the Instructor.
Students are requested to implement this case study during the lab classes.
6
Guidelines for the students:
Therefore, solving the Lab Exercises and the Case Studies will
follow a series of iterations to evolve into the Final System
7
CASE STUDY
Eastern State University Course Registration Problem
Statem ent
The new system will allow students to select four courses offering for the
coming semester. In addition, each student will indicate two alternative
choices in case a course offering becomes filled or canceled. No course
offering will have more than ten students or fewer than three students. A
course offering with fewer than three students will be cancelled. Once the
registration process is completed for as student, the registration system sends
information to the billing system so the student can be billed for the
semester.
Professor must be able to access the online system to indicate which courses
they will be teaching, and to see which students signed up for their course
offerings.
For each semester, there is a period of time that students can change their
schedule. Students must be able to access the system during this time to add
or drop courses.
8
Lab Assignments
EXERCISE 1:
Objective:
To understand the problem statement and analyze it.
To understand the meaning of use cases and actors.
EXERCISE 2:
Define Classes in the Logical View associated with each Use Case and
define their structure
Objective:
1. To understand the different type of analysis classes for each use case.
2. To create the structure of the s/w in terms of analysis classes.
3. To understand the concept of stereotype.
9
EXERCISE 3:
Draw sequence diagram for each Use Case identified in the problem
statement.
Objective:
To understand how different objects are interacting with each other.
To understand which event occurs first, and what happens next.
To understand the operations of the classes.
EXERCISE 4:
Objective:
To understand the difference b/w sequence diagram and collaboration
diagram
To learn what notations and symbols are used in a collaboration diagram.
10
EXERCISE 5:
Objective:
Identify the entity classes.
To understand the relationships between these classes.
Identify dependency, hierarchy and associativity between these classes.
11
Case Study
Library Information
Management System
12
Library Information Management System
13
Format For The
Deliverables
14
Use Case Specification : <Use-Case Name>
[ The description should briefly convey the role and purpose of the
use case. A single paragraph should suffice for this description.]
2. Flow of Events
[ This use case starts when the actor does something. An actor
always initiates use Cases. The use case should describe what the
actor does and what the system does in response. It should be
phrased in the form of a dialog between the actor and the system.
The use case should describe what happens inside the system, but
not how or why. If information is exchanged be specific about what
is passed back and forth. For example, it is not very illuminating to
say that the Actor enters customer information; it is better to say the
Actor enters the customer’s name and address. A Glossary of Terms
is often useful to keep the complexity of the use case manageable;
you may want to define things like customer information there, to
keep the use case from drowning in details.
15
Simple alternatives may be presented within the text of the use case.
If it only takes a few sentences to describe what happens when there
is an alternative; do it directly within the flow of events section. If
the alternative flows are more complex, use a separate section to
describe it. For example An Alternative Flow describes how to
describe more complex alternatives.
16
each alternative flow represents alternative behavior (many times,
because of exceptions that occur in the main flow). They may be as
long as necessary to describe the events associated with the
alternative behavior. When an alternative flow ends, the events of
the main flow of events are resumed unless otherwise stated.]
[There may be, and most likely will be, a number of alternative flows
in a use case. Keep each alternative separate to improve clarity.
Using alternative flows improves the readability of the use case, as
well as preventing use cases from being decomposed into hierarchies
of use cases. Keep in mind that use cases are just textual descriptions,
and their main purpose is to document the behavior of a system in a
clear, concise and understandable way.]
3. Special Requirements
17
quality attributes of the system to be built, including usability,
reliability, performance or supportability requirements. Additionally,
other requirements such as operating systems and environments,
compatibility requirements, and design constraints should be captured
in this section.]
4. Preconditions
[A precondition (of a use case) is the state of the system that must be
present prior to a use case being performed.]
5. Post Conditions
[A post condition (of a use case) is a list of possible states the system
can be in immediately after a use case has finished.]
6. Extension Points
[Extension points of the use case.]
6.1 <Name of extension point>
[Definition of the location of the extension point in the flow of events.]
18
Class Analysis Document
Identify all the Analysis Classes for your problem statement and
briefly describe their purpose.
19
Sequence Diagram Document
20
Collaboration Diagram Document
21
Class Diagram Document
22
Tutorial on Rational Rose
Analysis and Design Methodology
23
Use Case Diagram : Depicts interaction between Actors and Use Cases.
Use Case: A use case is a sequence of actions a system performs that yields
an observable result of value to a particular actor.
Actor: An actor represents many things that interact with the system.
24
Boundary Class: A boundary class is used to model interaction between the
systems surroundings and its inner workings. They are of following types:
25
Entity Class: An entity class stores and manages information in the system.
State Chart Diagram: State chart diagrams model the dynamic behavior of
individual classes or any other kind of object. They show the sequences of
26
states that an object goes through, the events that cause a transition from one
state to another, and the actions that result from a state change.
Second, you can use the object model as a logical data model. A logical data
model captures a conceptual view of a database. You can use the Analysis
language as the component language if you want to create a database-
independent logical data model. However, to implement the model you are
required to transform it to a data model and assign it to a supported DBMS.
27
Data Model Diagram: Data Model Diagrams use the UML profile notation
for representing data model entities. When you have an existing data model,
you can drag-and drop data model elements from the browser to the Data
Model Diagram or you can use the Add Tables sub-menu on the Query
menu to populate the diagram. When you are creating a new data model, you
can use the toolbox or the Create sub-menu on the Tools menu to create data
model elements in the Data Model Diagram.
Class Table
Operation Constraint
Attribute Column
Package Schema
Component Database
Association or Aggregation Non-Identifying Relationship
Composite Aggregation Identifying Relationship
Role Role
Multiplicity Cardinality
28
Creating Use Cases
Right-click on the Use Case View package in the browser to make the shortcut
menu visible.
Select the New: Actor menu option. A new actor called New Class is placed in
the browser.
With the actor called New Class selected, enter the desired name of the actor.
Right-click on the Use Case View in the browser to make the shortcut menu
visible.
Select the New: Use Case menu option. A new unnamed use case is placed in
the browser.
With the use case selected, enter the desired name of the use case.
29
Creating a Use Case brief Description in Rational Rose
1. Right-click on the use case in the browser to make the shortcut menu visible.
2. Select the Open Specification menu option.
3. Select the Files tab.
4. Right-click to make the shortcut menu visible.
5. Select the Insert File menu option.
6. Browse to the appropriate directory and select the desired file.
1. Double-click on the Main diagram in the Use Case View in the browser to
open the diagram.
2. Click to select an actor in the browser and drag the actor onto the diagram.
3. Repeat step 2 for each additional actor needed in the diagram
4. Click to select a use case in the browser and drag the use case onto the
diagram.
5. Repeat step 4 for each additional use case needed in the diagram.
30
Note: Actors and use cases may also be created directly on a use case
diagram by using the toolbar.
1. Click to select the Association icon or the Unidirectional Association icon from
the diagram toolbar. Note: If the Association icon is not present on the
toolbar, it may be added by right-clicking on the toolbar, selecting the
Customize menu choice from the shortcut menu, and adding the icon to the
toolbar.
31
5. Click the OK button to close the Specification.
1. Right-click on the Use Case View in the browser to make the shortcut menu
visible.
1. Right-click on the Use Case View in the browser to make the shortcut
menu visible.
32
2. Select the New: Activity Diagram menu choice. This will add an activity
diagram called New Diagram to the browser.
3. While the new diagram is still selected, enter the name of the diagram.
4. Double-click on the activity diagram in the browser to open the diagram.
Click on the originating activity and drag the transition to the decision icon.
33
Creating Guarded Transitions in Rational Rose
34
Click to select the State Transition icon on the toolbar and add any needed
incoming the outgoing transitions to the synchronization bar.
To resize the swimlane, click on the swimlane border and drag the swimlane to
the desired location.
Drag all needed activities and transitions into the swimlane, (Note: You may also
create new activities and transitions in the swimlane.)
Click to select the Start State or the End State icon from the toolbar.
Click on the activity diagram window to place the start or end state.
If you added a start state, click on the state Transition icon, click on the start
state, and drag the transitions to the first activity in the workflow.
If you added an end state, click on the State Transition icon, click on the
successor activity, and drag the transition to the end state.
35
Finding Classes
Right-click to select the class in the browser and make the shortcut menu
visible.
Select the Open Specification menu choice.
Select the General tab.
Click the arrow in the Stereotype field to make the drop-down menu visible
and select the desired stereotype or, to create a new stereotype, enter the
name of the stereotype in the Stereotype field.
Click the OK button to close the Specification.
36
Relocating Classes in the Rose Browser
Click to select the class in the browser.
Rose automatically creates the Main class diagram in the Logical View of the
model.
To add packages to the Main class diagram:
Double-click on the Main diagram in the browser to open the diagram.
37
To Set Visibility Display in Rational Rose
38
Discovering Object Interaction
1. Right-click to select the Logical View package in the browser and make
the shortcut menu visible.
2. Select the New: Use Case Diagram menu choice. This will add a new use
case diagram called NewDiagram to the browser.
3. While the NewDiagram is still selected, enter the name Realizations:
1. Double-click on the Realizations use case diagram in the browser to open the
diagram.
39
Creating A Sequence Diagram in Rational Rose
1. Right-click to select the use case realization in the Logical View of the
browser and make the shortcut menu visible.
2. Select the New: Sequence Diagram menu choice. An unnamed sequence
diagram is added to the browser.
3. With the new sequence diagram selected, enter the name of the sequence
diagram.
40
Creating Objects and Messages in Sequence Diagrams in Rational Rose
41
Linking Diagrams in Rational Rose
42
6. Repeat step 5 for each additional class that is to be placed onto the
diagram.
43
Specifying Relationships
1. Click to select the Association icon from the toolbar. The association
icon may be added to the toolbar by right-clicking on the toolbar and
selecting the Customize menu command.
2. Click on one of the associated classes in a class diagram
3. Drag the association line to the other associated class
1. Select the Aggregation icon from the toolbar. The Aggregation icon may
be added to the toolbar by right-clicking on the toolbar and selecting the
Customize menu command.
2. Click on the class playing the role of the “whole” in a class diagram and
drag the aggregation line to the class playing the role of the “part”.
44
1. Right-click on the relationship line near the class tat is modifies to make
the shortcut menu visible.
2. Select the Role Name menu choice.
3. Enter the name of the role.
45
Creating Package Relationships in Rational Rose
46
47