Академический Документы
Профессиональный Документы
Культура Документы
Page no:
STUDY OF UML
AIM:
General study of UML
DESCRIPTION:
The heart of object-oriented problem solving is the construction of a
model. The model abstracts the essential details of the underlying problem from
its usually complicated real world. Several modeling tools are wrapped under the
heading of the UML, which stands for Unified Modeling Language. The purpose of
this course is to present important highlights of the UML.
CLASS
A class is a blueprint or prototype from which objects are created. This
section defines a class that models the state and behavior of a real-world object. It
intentionally focuses on the basics, showing how even simple classes can cleanly
model state and behavior. For example, the class Dog would consist of traits
shared by all dogs, such as breed and fur color (characteristics), and the ability to
bark and sit (behaviors).
OBJECT
An object is a software bundle of related state and behavior. Software
objects are often used to model the real-world objects that you find in everyday
life. This lesson explains how state and behavior are represented within an object,
introduces the concept of data encapsulation, and explains the benefits of
designing your software in this manner. A pattern(exemplar) of a class. The class
Dog defines all
Page no:
possible dogs by listing the characteristics and behaviors they can have; the object
Lassie is one particular dog, with particular versions of the characteristics. A Dog
has fur; Lassie has brown-and-white fur.
OBJECT ORIENTATION CONCEPTS:
Object-Orientation goes beyond just modeling attributes and behavior. It
considers the other aspects of objects as well. Object-oriented programming
(OOP) is a programming paradigm that uses "objects" data structures consisting
of data fields and methods together with their interactions to design applications
and computer programs. Programming techniques may include features such as
data abstraction, encapsulation, modularity, polymorphism, and inheritance. These
aspects are called abstraction, Inheritance, polymorphism and encapsulation.
ABSTRACTION
Abstraction is simplifying complex reality by modeling classes appropriate
to the problem, and working at the most appropriate level of inheritance for a
given aspect of the problem.
For example, Lassie the Dog may be treated as a Dog much of the time, a
Collie when necessary to access Collie-specific attributes or behaviors, and as an
Animal (perhaps the parent class of Dog) when counting Timmy's pets. Abstraction
is also achieved through Composition. For example, a class
ENCAPSULATION:
Encapsulation conceals the functional details of a class from objects that
send messages to it.
For example, the Dog class has a bark () method. The code for the bark() method
defines exactly how a bark happens (e.g., by inhale() and then exhale(), at a
particular pitch and volume). Timmy, Lassie's friend, however, does not need to
UNIFIED MODELING LANGUAGE
Page no:
know exactly how she barks. Encapsulation is achieved by specifying which classes
may use the members of an object. The result is that each object exposes to any
class a certain interface those members accessible to that class.
The reason for encapsulation is to prevent clients of an interface from
depending on those parts of the implementation that are likely to change in the
future, thereby allowing those changes to be made more easily, that is, without
changes to clients. For example, an interface can ensure that puppies can only be
added to an object of the class Dog by code in that class. Members are often
specified as public, protected or private, determining whether they are available
to all classes, sub-classes or only the defining class. Some languages go further:
Java uses the default access modifier to restrict access also to classes in the
same package, C# and VB.NET reserve some members to classes in the same
assembly using keywords internal (C#) or Friend (VB.NET), and Eiffel and C++
allow one to specify which classes may access any member.
POLYMORPHISM:
Polymorphism allows the programmer to treat derived class members just
like their parent class's members. More precisely, Polymorphism in object-oriented
programming is the ability of objects belonging to different data types to respond
to calls of methods of the same name, each one according to an appropriate typespecific behavior. One method, or an operator such as +, -, or *, can be abstractly
applied in many different situations. If a Dog is commanded to speak(), this may
elicit a bark(). However, if a Pig is commanded to speak(), this may elicit an
oink(). Each subclass overrides the speak() method inherited from the parent class
Animal.
INHERITANCE:
UNIFIED MODELING LANGUAGE
Page no:
bark () method produces a high pitch by default. Subclasses can also add new
members. The Chihuahua subclass could add a method called tremble (). So an
individual Chihuahua instance would use a high-pitched bark () from the
Chihuahua subclass, which in turn inherited the usual bark () from Dog. The
Chihuahua object would also have the tremble () method, but Lassie would not,
because she is a Collie, not a Chihuahua. In fact, inheritance is an "a... is a"
relationship between classes, while instantiation is an "is a" relationship between
an object and a class: a Collie is a Dog ("a... is a"), but Lassie is a Collie ("is a").
Thus, the object named Lassie has the methods from both classes Collie and Dog.
Multiple inheritances are inheritance from more than one ancestor class,
neither of these ancestors being an ancestor of the other. For example,
independent classes could define Dogs and Cats, and a Chimera object could be
created from these two which inherits all the (multiple) behavior of cats and dogs.
This is not always supported, as it can be hard to implement
UNIFIED MODELING LANGUAGE
Page no:
At the center of the UML are its nine kinds of modeling diagrams, which we
describe here.
Page no:
Classes are the "blueprints" for objects. A class wraps attributes (data) and
behaviors (methods or functions) into a single distinct entity. Objects are
instances of classes.
Page no:
the medical clinic. The actor is a Patient. The connection between actor and use
case is a communication association (or communication for short).
Actors are stick figures. Use cases are ovals. Communications are lines that
link actors to use cases.
Page no:
Generating test cases. The collection of scenarios for a use case may
suggest a suite of test cases for those scenarios.
Class diagrams:
A Class diagram gives an overview of a system by showing its classes and
the relationships among them. Class diagrams are static -- they display what
interacts but not what happens when they do interact.
The class diagrams below models a customer order from a retail catalog. The
central class is the Order. Associated with it is the Customer making the
purchase and the Payment? A Payment is one of three kinds: Cash, Check, or
Credit. The order contains Order Details (line items), each with its associated
Item.
UNIFIED MODELING LANGUAGE
Page no:
UML class notation is a rectangle divided into three parts: class name, attributes,
and operations. Names of abstract classes, such as Payment, are in italics.
Relationships between classes are the connecting links.
Our class diagram has three kinds of relationships.
Page no:
An association has two ends. An end may have a role name to clarify the
nature of the association. For example, an Order Detail is a line item of each
Order.
A navigability arrow on an association shows which direction the association
can be traversed or queried. An Order Detail can be queried about its Item, but
not the other way around. The arrow also lets you know who "owns" the
association's
implementation;
in
this
case,
Order
Detail
has
an
Item.
Every class diagram has classes, associations, and multiplicities. Navigability and
roles are optional items placed in a diagram to provide clarity.
UNIFIED MODELING LANGUAGE
Page no:
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 depends on another if changes in the other could possibly force changes
in the first.
Object diagrams show instances instead of classes. They are useful for
explaining small pieces with complicated relationships, especially recursive
relationships.
Page no:
This small class diagram shows that a university Department can contain lots of
other Departments.
The object diagram below instantiates the class diagram, replacing it by a concrete
example.
Page no:
Hotel
has
available
rooms,
then
it
makes
Reservation
and
Confirmation.
Each vertical dotted line is a lifeline, representing the time that an object
exists. Each arrow is a message call. An arrow goes from the sender to the top of
Page no:
the activation bar of the message on the receiver's lifeline. The activation bar
represents the duration of execution of the message.
In our diagram, the Hotel issues a self call to determine if a room is
available. If so, then the Hotel creates a Reservation and a Confirmation. The
asterisk on the self call means iteration (to make sure there is available room for
each day of the stay in the hotel). The expression in square brackets, [ ], is a
condition.
Collaboration diagrams:
Collaboration diagrams are also interaction diagrams. They
Convey the same information as sequence diagrams, but they focus on
object roles instead of the times that messages are sent. In a sequence diagram,
object roles are the vertices and messages are the connecting links.
Page no:
The object-role rectangles are labeled with either class or object names (or
both). Class names are preceded by colons (: ).
Each message in a collaboration diagram has a sequence number. The toplevel message is numbered 1. Messages at the same level (sent during the same
call) have the same decimal prefix but suffixes of 1, 2, etc. according to when they
occur.
Page no:
States are rounded rectangles. Transitions are arrows from one state to
another. Events or conditions that trigger transitions are written beside the arrows.
Our diagram has two self-transition, one on Getting SSN and another on Getting
PIN.
The initial state (black circle) is a dummy to start the action. Final states are
also dummy states that terminate the action.
The action that occurs as a result of an event or condition is expressed in the
form /action. While in its Validating state, the object does not wait for an outside
event to trigger a transition. Instead, it performs an activity. The result of that
activity determines its subsequent state.
Activity diagrams:
An activity diagram is essentially a fancy flowchart. Activity diagrams and
state chart diagrams are related. While a state chart diagram focuses attention on
UNIFIED MODELING LANGUAGE
Page no:
Circle at the top and ends at the concentric white/black stop circles at the
bottom. The activities are rounded rectangles.
Page no:
Page no:
A transition may fork into two or more parallel activities. The fork and the
subsequent join of the threads coming out of the fork appear in the diagram as
solid bars.
Page no:
2.
3.
4.
Set the lifelines for each and every object by sending create
and destroy messages.
5.
6.
Page no:
7.
2.
3.
4.
5.
6.
7.
2.
Page no:
3.
4.
5.
6.
7.
8.
2.
3.
4.
The high-level states of the objects & only then consider its
possible sub-states.
5.
6.
7.
Page no:
8.
Consider
ways
to
simplify
your
machine
by
using
under
some
Check
that
all
states
are
reachable
combination of events.
10.Check that no state is a dead from which no combination of
events will transition the object out of that state.
11.Trace through the state machine, either manually or by using
tools, to check it against expected sequence of events & their
responses.
Page no:
1.
2.
3.
4.
5.
6.
7.
8.
9.
server.
2.
3.
4.
Page no:
5.
6.
7.
Adorn
with
nodes
&
constraints
&
draw
the
deployment diagram.
use
case
elements
(ovals),
objects
(rectangles)
and
Page no:
development where the whole project is completed from start to finish before a
user gets to try it out.) Then, as the developer begins to understand how the
components interact and makes modifications in the design, Rational Rose can
perform what is called "round-trip engineering" by going back and updating the
rest of the model to ensure the code remains consistent.
The overall model contains classes, use cases, objects, packages,
operations, component packages, components, processors, devices and the
relationship between them. Each of these model elements possess model
properties that identify and characterize them.
A model also contains diagrams and specifications, which provides a means
of visualizing and manipulating the models elements and their model properties.
Since diagram is used to illustrate multiple views of a model, icons representing a
model element can appear in none, or several of a models diagrams.
The application therefore enables you to control, which element, relationship
and property icons appear on each diagram, using facilities provided by its
application window. Within its application window, it displays each diagram in a
diagram window and each specification in a specification window.
It provides a separate tool , called Model Integrator to compare and merge
models and their controlled units. It also enables teams to reuse large- scale
design assets developed in earlier modeling efforts by providing the possibility to
add frame works in Rational Rose.
HISTORY
ROSE = Rational Object Oriented Software Engineering
Page no:
Page no:
Page no:
Class diagram:
Page no:
Page no:
Buy product
Barcode scanning
Pay bill
Customer
Cashier
Process sale
Close sale
Update Inventory
Tax calculation
Page no:
Cashier
POS System
1: process sale
2: enter item
3: scan item
4: total cost
5: close sale
6: total cost with tax
7: bill generation
8: generate reoprt
Page no:
Cashier
POS System
Codescanne
r
Card reader
Bank
1: Enter no of items
2: get item id
3: show item details
4: calculate bill
5: bill payment
6: get credit card number
7: verify validation
8: valid
9: validation ok
10: generate report
Page no:
1: Enter no of items
5: bill payment
Cashier
2: get item id
POS
System
4: calculate bill
10: generate report
Codescan
ner
3: show item details
9: validation ok
7: verify validation
Card
reader
Bank
8: valid
Page no:
Customer
Cashier
Barcode reader
pos system
select
product
prepare item
list
scan items
bill
generation
process bill
enters the
shop
Page no:
Component Diagram
Point of
scale
Component diagram represents a software module with a well defined interface.
The interface of a component is represented by one or several interface
components or elements that the component provides.
DEPLOYMENT DIAGRAM:
<<server>>
POSSystem
<<database>>
POSDB
<<device>>
Customers
RESULT:
Thus various UML Diagrams were generated for POINT OF SALE SYSTEM and the
corresponding code was generated.
Forward and Reverse engineering can also be performed.
Page no:
Page no:
Page no:
Page no:
CASES:
Registration
Login
Create order
Book catalog
Manage cart and payments
Order status
Inventory
RELATIONSHIPS USED:
Association
Dependency
Composition
Modeling steps for Use case Diagram
1. Draw the lines around the system and actors lie outside the system.
Identify the actors which are interacting with the system.
2. Separate the generalized and specialized actors.
3. Identify the functionality the way of interacting actors with system and
specify the behavior of actor.
4. Functionality or behavior of actors is considered as use cases.
5. Specify the generalized and specialized use cases.
6. Se the relatonship among the use cases and in between actor and use
cases.
Adorn with constraints and notes.
7. If necessary, use collaborations to realize use cases.
Modeling steps for Sequence Diagrams
1. Set the context for the interactions, system, subsystem, classes, object or
use cases.
2. Set the stages for the interactions by identifying objects which are placed
as actions in interaction diagrams.
3. Lay them out along the X-axis by placing the important object at the left
side and others in the next subsequent.
4. Set the lifelines for each and every object by sending create and destroy
messages.
5. Start the message which is initiating interactions and place all other
messages in the increasing order of items.
6. Specify the time and space constraints.
UNIFIED MODELING LANGUAGE
Page no:
Page no:
Page no:
CLASS DIAGRAM:
A Class is a standard UML construct used to detail the pattern from which
objects will be produced at run time. A class is a specification- an object is an
instance of a class. Classes may be inherited from other classes, have other
classes as attributes, delegate responsibilities to other classes and implement
abstract interfaces.
The class diagram for the proposed system has several classes. These
classes have attributes and operations. The description for each of them is
described clearly.
The classes include
Book shop staff
Book
Bookshop
UNIFIED MODELING LANGUAGE
Page no:
Item
Customer
Shopping cart
Order
Item order
Shipping address and billing address.
PACKAGES:
The class diagram of the online book shop system is shown to be
grouped into three packages. The contents of the packages are as follows:
PACKAGE-1: BOOKSHOP
This package consists of following classes:
1. Bookshop staff
2. Book
3. Bookshop
4. Item
PACKAGE-2: CUSTOMER
This package consists of following classes:
1. Customer
2. Address
3. Billing Address
4. Shipping Address
Page no:
CLASS DIAGRAM:
Page no:
Page no:
SEQUENCE DIAGRAM:
UML provides a graphical means of depicting object interactions over time in
sequence diagrams. These typically show a user or actor and the objects and
components they interact with in the execution of a use case.
customer
registration
login
create order
book catalog
inventory
bookshop
staff
cart
shippment
details
payment
consortinum
1: login request
2: manages
3: updates
4: update
5: verify
6: register first
7: registered logon request
8: verify
9: logon successful
10: create order
11: select books
12: verify
13: stock ok
14: confirm selection
15: add to cart
16: shippment details
17: payment
18: delivered successfully
Page no:
database
COLLOBORATION DIAGRAM:
Collaboration names a society of classes, interfaces and other elements that work
together to provide some cooperative behavior that is bigger than the sum of all
its parts. Collaboration diagram emphasis is based on structural organization of
the objects that send and receive messages.
registrat
ion
login
5: verify
create
order
1: login request
7: registered logon request
6: register first
payme
nt
4: update
12: verify
consorti
cart 8: verify shippment
num
details
16: shippment details
17: payment
bookshop
custom
staff
er
18: delivered successfully
3: updates
9: logon successful
13: stock ok
databa
se
invent
ory
Page no:
selections
select
valid login
mainscreen
choose
create
order
browse
screen
listed books
in catalog
add to
cancel
wait for
view details
not satisfied
invalid transaction
can't find
cart
wait for
result
cancels
confirm
wait for
transaction details
Page no:
ACTIVITY DIAGRAM:
An activity diagram is essentially a fancy flowchart. Activity diagrams and
state chart diagrams are related. While a state chart diagram focuses attention on
an object undergoing a process (or on a process as an object), an activity diagram
focuses on the flow of activities involved in a single process. The activity diagram
shows the how those activities depend on one another. Activity diagrams can be
divided into object swim lanes that determine which object is responsible for which
activity. A single transaction comes out of each activity, connecting it to the next
activity.
display
welcome msg
get login
get pwd
and validate
accepted
rejected
display item
info
accept
selection
more selections
completed
display
order
acceptance
create order
for cart
rejected
ship to
customer
Page no:
COMPONENT DIAGRAM:
A component is a code module. Component diagrams are physical
analogs of class diagram. Each component belongs on a node. Components are
shown as rectangles with two tabs at the upper left.
order.java
address.ja
va
book.java
central server.java
address.cl
ass
central
server.class/.dll
item.class
central
database
address.db
order.db
bokshop.java
bookstaff.java
item.java
order.class
book.class
bookshop.
class
bookstaff.c
lass
books.db
items.db
Page no:
DEPLOYMENT DIAGRAM:
Deployment diagram shows the physical configurations of software and
hardware.
Page no:
RESULT:
Thus various UML Diagrams were generated for ONLINE BOOK SHOP and the
corresponding code was generated.
Forward and Reverse engineering can also be performed.
Page no:
Page no:
Conceptualization:
Assumptions:
The users are allowed to register and give user ids to have identification.
The users are allowed to bid for any price according to their wish provided
its more than the minimum price of auction.
The fixed cut-off price is decided and confirmed for every product.
The auctioneer requesting the product for the cut-off price is given
priority.
Page no:
Inputs:
Outputs:
Key Terms:
An Auction Simulation:
Loop
Check any product details.
Check for cutoff price.
Actors:
1. Purchaser
2. Seller
Page no:
Login
Seller
Purchaser
Chatting
Select Method of bidding
Select Method of Auction
Buy Goods
Register for goods
Select history of database
Draw the lines around the system and actors lie outside the system.
Identify the actors which are interacting with the system.
Separate the generalized and specialized actors.
Identify the functionality the way of interacting actors with system and
specify the behavior of actor.
Page no:
Page no:
Page no:
2.
3.
4.
5.
6.
Page no:
Class Diagram:
Page no:
customer(bidder)
site
name
listOfAvailableProducts
listOfPrices
webHost
update the site with products()
sell the products()
name
contact info
address
logon to the site()
search for the required product()
bid forproduct()
pay the price()
product
id
name
type
currentBiddingPrice
finalCutOffPrice()
product()
auctioner
id
sendTheDetalisOfProductsToBidder()
updateTheBiddingPrice()
sellTheProduct()
getThePricepaid()
auctioner()
Page no:
login
request/send details
BIdder
Auctioner
Sequence diagram:
UNIFIED MODELING LANGUAGE
Page no:
s:site
a:auctioner
p:product
: BIdder
login
search
pay price
logout
Collaboration Diagram:
Page no:
s:site
1: login
12: logout
8: check for product
2: search
p:product
5: display details
9: give ackn if suitable for selling
: BIdder
4: get details
3: request product details
6: pay final price or bid for product
7: update bid price
10: buy the product
11: pay price
a:auctione
r
Page no:
ActivityDiagram:
log on to the
site
request details
yes
no
no
if suitable for
selling
sell/buy the
product
Page no:
wait for
request
wait to update
bid price
Page no:
COMPONENT DIAGRAM:
name
list of prices
central
server java
web host
central server
class
site
customer
Central
database
product.db
Page no:
Deployment diagram:
A deployment diagram shows the physical configurations of software and
hardware.
Dtabase
Server
<<device>>
Customer 1
<<device>>
Customer n
Result:
Thus various UML diagrams were generated for AN ONLINE AUCTION SALE and
corresponding code was generated .
Forward and Reverse engineering can also be performed.
.
Page no:
AN AIRPORT SIMULATION
Page no:
Page no:
Overview
A critical step of the project is to design a modeling and simulation
infrastructure to experiment and validate the proposed solutions
The ever growing demand of air transport shows the vulnerability of the
current air traffic management system: Congestion, time delays, etc.particularly in
poor whether conditions.
The project is focused on controller and pilot assistance systems for
approach and ground movements. The critical step of the project was to design an
airport modeling and simulation infrastructure to improve the safety and efficiency
of ground movements in all whether conditions. It simulates the arrivals and
departures at an airport in a time sequence. During every minute, planes may
enter the systems, they may land, they may take off, or they may crash. The
project must keep track of planes, assign planes to runways, execute the take offs
and landings, and keep track of status of each plan, runway and terminal.
So the finally made computer software should model various aspects
of the total airports operation-connecting airside and landside, literally from the
airspace to the curb.
As part of case study, following analysis diagrams will be created
1. Use cases for the system.
2. Class diagram for initially identified classes.
3. Activity diagram to show flow for each use case.
4. Sequence and Collaboration diagram.
5. State chart diagram shows states before and after each action.
Conceptualization
Assumptions;
All take offs take the same amount of time and all landings take the same
amount of time (through these two times may be different).
Planes arrive for landing at random times, but with a specified probability of
a plane arriving during any given minute.
Planes arrive for take off at random times, but with a specified probability of
a plane arriving during any given minute
Landings have priorities over takeoffs.
Planes arriving for landing have a random amount of fuel and they will crash
if they do not land before they run out of fuel.
Input will be:
The amount of time needed for one plane to land.
The amount of time needed for one plane to takeoff.
UNIFIED MODELING LANGUAGE
Page no:
The
The
The
The
The
Key terms:
Aircraft simulation.
Airport: runways, terminals, planes, control room.
Aircraft: passengers, model no. cockpit, pilots.
Function points:
1. Transmit/receive signals.
2. Pilot sends signals for takeoff/landing.
3. Loop
- Check status of each runway.
- Finalize a free runway.
- Assign the runway to the plan.
4. Update status of runway and terminal.
5. Get the plane landed safely.
6. Check if time left for next departure.
7. Loop
- Check the status of each terminal.
- Validate if terminal suitable for particular aircraft.
- Assign terminal to aircraft.
8. Get the plane parked in the terminal.
9. Update status of terminal.
Requirement Analysis:
Textual Analysis:
This covers the requirements and diagrams of the project. The complete
simulation of airport control system as follows
Actors:
These are who are involved in interaction of the whole process.
UNIFIED MODELING LANGUAGE
Page no:
1. Technical head: He is the person who supervises the controls the ground
traffic on runway. He checks the status of runways and assigns the free
runways and terminals for takeoff and landing.
2. Pilot: He is the person who controls the aircraft. He transmits or receives
signals regarding the free runways, and terminal from the control room. He
is responsible for the safe landing or takeoffs the planes.
Use cases:
The steps involved in the whole process are indicated as use cases.
Transmit/receive signals.
Check availability of runways.
Land the plane.
Check if time left for next departure.
Check for free terminal.
Update status of runway, terminal.
1. Transmit/receive signals: The pilot in the aircraft transmits signals for
requesting a free runway to takeoff or land. The control room on the ground
receives these signals from the aircrafts.
2. Check availability of runway: The status of each runway in the airport is
checked if its free and its going to be free until the particular aircraft is
landed or takeoff. If this is going to be free then runway number is
transmitted to the pilot on aircraft.
3. Land the plane: The plane is landed safely on the airport as per directions
given by the control room regarding runway and timings.
4. Check if time left for next departure: If the plane leaves immediately
after landing then assign again a runway for takeoff. If there is still time then
the plane has to be parked in a terminal.
5. Check availability of terminals: the status of each terminal is to be
checked to find a free terminal. It should be checked whether that particular
model of plane fits into that terminal. Then that particular terminal has to be
assigned to the plane.
6. Update Status: the status of runway and terminal are to be set to be using
while using them. The status has to be immediately changed as soon as the
work is complete. This should be supervised carefully to avoid collisions and
crashes of aircrafts.
Classes:
The classes contain the attributes and operations related to them the main
classes classified in this solution are:
UNIFIED MODELING LANGUAGE
Page no:
1. Control Room: he is the person who supervises the controls the ground
2.
3.
4.
5.
traffic on runway. He checks the status of runways and assigns the free
runways and terminals for takeoff and landing.
Plane Cockpit: He is the person who controls the aircraft. He transmits or
receives signals regarding the free runways and terminals from the control
room. He is responsible for the safe landing or takeoff of the plane.
Runway: This is the part the planes use to land or takeoff only one plane
can use runway at a time to takeoff or land.
Terminal: This is the place where the planes are parked until the next
departure. The terminal is to be parked in it.
Takeoff/land: The leaving of planes is called takeoff and coming back to
runway is called landing. The runway is used for either purpose.
Diagrams:
Class Diagram
A Class is a standard UML construct used to detail the
pattern from which objects will be produced at run time. A class is a specificationan object is an instance of a class. Classes may be inherited from other classes,
have other classes as attributes, delegate responsibilities to other classes and
implement abstract interfaces.
Classes of airport simulation are:
Class
Attributes
Operations
Control Room
-Technical head
+Receive signals from
-No of staff
planes()
-systems to control
+Check
for
free
runway()
+Send runway no()
+Check
for
next
departure()
+Look
for
free
terminal()
+Send terminal no to
plane()
+Get plane parked()
Takeoff/Landing
-Runway no
+Update
status
of
-Flight no
runway after each take
-Status
of or landing()
-Time taken
Plane Cockpit
-No of pilots
+Send signal to ground
-Flight no
station()
-Destination
+Receive runway no()
-Timings
+Land on runway()
+Request terminal if
UNIFIED MODELING LANGUAGE
Page no:
time
left
for
next
departure()
+Receive terminal no()
+Get the plane parked
in the terminal()
Terminal
Runway
-No of runways
-Size of terminal
-Flight model which fits ------------------------in
-Status of terminal
-No of runways
+Update
status
of
-Length of runway
runway
after
each
Status of runway
takeoff/landing()
-Free timings
-Runway no
Sequence diagram
Page no:
Objects
1. Runway: This is the path the plane uses to land or takeoff. Only one
plane can use a runway at a time takeoff or landing.
2. Takeoff/Landing: The leaving of plane is called takeoff and coming
back to runway is called landing. The runway is used for either purpose.
3. Whether
Conditions: The whether department decodes the
atmospheric data files from the current whether conditions and sends
them to the control room. The systems in the control room checks
whether the condition is suitable for landing the planes.
4. Terminal: This is the place where the planes are parked until the next
departure. The terminal differs in size and shape. The plane suitable for
that particular terminal is to be parked in it.
5. Cockpit: He is the person who controls the aircraft. He transmits or
receives signals regarding the free runways and terminal fro the control
room. He is responsible for the safe landing or takeoff of the planes.
Collaboration Diagram
Collaboration names a society of classes, interfaces and other
elements that work together to provide some cooperative behavior that is
bigger than the sum of all its parts. Collaboration diagram emphasis is based
on structural organization of the objects that send and receive messages.
Activity Diagram
Page no:
Deployment Diagram
Deployment diagram shows the physical configurations of software
and hardware.
Class Diagram:
Page no:
Airport Simulation
Control-Cockpit
ControlRoom
NoOfStaff : Integer
SystemsToControl : String
technicalHead : String
Flight No : Integer
No of pilots : Integer
timings : Integer
if time left to wait sends message to control room()
lands on the runway()
plane is taken to free terminal()
recieves runway no to land()
sends signal for landing to ground control()
1..*
Terminal
FreeTimmings : Integer
modelNoOfAircraftWhichItSuitable : Integer
<<Interface>>
<<interface>>
landing
noOfFreeTerminal()
sizeOfTerminal()
TakeOff
attribute
attribute
changeStatusOfRunwayAfterLanding()
changeStatusOfRunwayAfterAlnding()
WeatherDept
Head : String
CheckWeatherConditions()
SendWeatherReport()
WeatherDept()
RunWay
FreeTimings : Integer
LengthOfRunway : Integer
noOfRunway : Integer
UpdateStatusAfterEachTakeOffOrLanding()
RunWay()
Page no:
send/receive signal
land / aircraft
Plane cockpit
park aircraft
Page no:
Sequence Diagram:
Airport Simulation
p:prane
Cockpit
: control room
T:terminal
R:runway
W:WeatherD
ept
1: request signal
2: send signal
3: Check Weather conditions
4: send acknowledgement
5: check avaliable for run way
6: wait signal
7: send signal
8: send ack
9: update runway status
10: if time is for next dep send req
11: if terminal is free send terminal no
12: send terminal
13: land aircraft
14: update status of terminal
Page no:
Collaboration Diagram:
1: request signal
6: wait signal
7: send signal
8: send ack
12: send terminal
13: land aircraft
p:prane
Cockpit
T:termin
al
: control room
5: check avaliable for run way
9: update runway status
2: send signal
4: send acknowledgement
R:runwa
y
Page no:
Activity Diagram:
Runway allocation for takeoff Activity Diagram
landing
give aircraft
info to lock s/m
lock system
checking for ks
no
acquire landing
area lock
acquire
runway lock
aircraft at
take off area
if the aircraft is at takeoff area then
release terminal and taxiing locks
while moving from takeoff area
release takeoff area lock and acquire
runway lock
yes
priority
landing on
another runway
acquire
terminal lock
acquire
taxiing lock
move to the terminal gate and
release terminal and taxiing
lock
Page no:
takeoff
checks
for locks
if locks are available
acquire takeoff
area lock
acquire
taxiing lock
aircraft at
takeoff area
acquire
runway lock
Page no:
wait for
running status
req runway no
wait for
runway no
avail
if time left
not avail
land on
runway
avail
not avail
wait for
terminal no
not avail
avail
halt
Page no:
Component Diagram:
terminal
lock.java
central
server java
landing.jav
a
takeofflock
.java
central server
.class / .dll
taxiinglock.
java
terminalloc
k.class
landing.cla
ss
takeofflock
.class
taxiinglock.
class
central
database
airport.db
priority.db
Deployment Diagram:
Page no:
<<DATA BASE>>
central database
<<SERVER>>
central server
<<WIRELESS COMMUNICATION>>
<<DEVICE>>
<<DEVICE>>
aircarft controlor
<<DEVICE>>
lockmanager
<<DEVICE>>
control manager
taxiing
manager
Result:
Page no:
The various UML diagrams were drawn for AIRPORT SIMULATION SYSTEM
application and the corresponding code was generated.
Forward and Reverse engineering can also be performed.
Page no:
A SIMULATED COMPANY
A SIMULATED COMPANY
UNIFIED MODELING LANGUAGE
Page no:
OVERVIEW:
A critical step of the project is to design a modeling and simulation infrastructure
to experiment and validate the proposed solutions.
Simulated company is an example that shows the documents produced when
undertaking the analysis and design of an application that simulates a small
manufacturing company. This application is called simco: Simulated Company.
The project if focused on the user to take lend, purchase a machine and over
a series of monthly and yearly production runs follows the concept of the
company. The company has to see all the takings and the losses. They have to see
all dealings of the company and see the additional features of the machine for
better development.
The company accounts are updated for a given month. The accounts take
into the gross profits from the sales. General expenses such as salary and rent are
taken into account to calculate the net profit for the company. In addition details
such as inventory and sales are updated.
As part of the case study, following analysis diagrams will be updated.
o
o
o
o
o
Conceptualization:
Assumptions:
The company has to take the loan and repay the loan.
It has to purchase machinery and start the production.
The sales person has to sell the foods and update the details in the record.
The sales has to submit the record and stock details required.
The performance department has to prepare record statistics as given by
marketing department.
The performance department has to get collected details from all the departments
and submit to the company.
Inputs:
The amount of time required for sanctioning the loan.
The amount of time needed for the production.
UNIFIED MODELING LANGUAGE
Page no:
The probability for estimating the machinery cost and raw materials.
The probability of estimating profit and loss.
Outputs:
Key Terms:
Pay loan/repay loan
Purchase machinery and start production.
Sell the products and updated the records.
The performance department has to update the statistics and to the company.
Modeling steps for Use case Diagram
1.
2.
3.
4.
Draw the lines around the system and actors lie outside the system.
Identify the actors which are interacting with the system.
Separate the generalized and specialized actors.
Identify the functionality the way of interacting actors with system and
specify the behavior of actor.
5. Functionality or behavior of actors is considered as use cases.
6. Specify the generalized and specialized use cases.
7. Se the relationship among the use cases and in between actor and use
cases.
8. Adorn with constraints and notes.
9. If necessary, use collaborations to realize use cases.
Page no:
4. Set the lifelines for each and every object by sending create and
destroy messages.
5. Start the message which is initiating interactions and place all other
messages in the increasing order of items.
6. Specify the time and space constraints.
Set the pre and post conditioned.
Modeling steps for Collaboration Diagrams
1. Set the context for interaction, whether it is system, subsystem,
operation or class or one scenario of use case or collaboration.
2. Identify the objects that play a role in the interaction. Lay them as
vertices in graph, placing important objects in centre and neighboring
objects to outside.
3. Set the initial properties of each of these objects. If the attributes or
tagged values of an object changes in significant ways over the
interaction, place a duplicate object, update with these new values and
connect them by a message stereotyped as become or copy.
4. Specify the links among these objects. Lay the association links first
represent structural connection. Lay out other links and adorn with
stereotypes.
5. Starting with the message that initiates this interaction, attach each
subsequent message to appropriate link, setting sequence number as
appropriate.
6. Adorn each message with time and space constraints if needed
7. Attach pre & post conditions to specify flow of control formally.
Page no:
Page no:
Page no:
Class Diagram:
Page no:
Page no:
Sequence Diagram:
Page no:
Collaboration Diagram:
Page no:
Activity Diagram:
Page no:
Page no:
Component Diagram
<<Application>>
Simulated
company
Page no:
DEPLOYMENT DIAGRAM:
<<server>>
bank
<<Device>>
Company
Result:
Thus various UML diagrams were generated for SIMULATED COMPANY and
corresponding code was generated .
Forward and Reverse engineering can also be performed.
Page no:
Page no: