Object Oriented Software EngineeringfinalLab
Object Oriented Software EngineeringfinalLab
SOFTWARE ENGINEERING
LAB
Introduction of all Diagrams to be drawn
A diagram is the graphical presentation of a set of elements, most often rendered as a
connected graph of vertices (things) and arcs (relationships). A diagram is a projection
into a system. The UML includes nine such diagrams.
Conclusion: The problem statement was written successfully by following the steps
described above.
It's important to note that an SRS contains functional and nonfunctional requirements
only; it doesn't offer design suggestions, possible solutions to technology or business
issues, or any other information other than what the development team understands the
customer's system requirements to be.
Conclusion: The SRS was made successfully by following the steps described above.
ATM
Version 1.0
November 14 , 2024
AC Alternate Current
AIMS ATM Information Management System.
ATM An unattended electronic machine in a public place, connected
to a data system and related equipment and activated by a
1.4 References
The references for the above software are as follows:-
i. www.google.co.in
ii. www.winkipedia.com
iii. IEEE. Software Requirements Specification Std. 830-1993.
iv. Chevy Chase Bank, UMBC Branch.
v. Russell C. Bjork Requirements Statement for Example ATM
System. Online.
URL: http://www.math-cs.gordon.edu/local/courses/cs211/ATMExample/
There are different kind of users that will be interacting with the system. The
intended user of the software are as follows:-
User A: A novice ATM customer. This user has little or no experience
with electronic means of account management and is not a frequent user
of the product. User A will find the product easy to use due to simple
explanatory screens for each ATM function. He is also assisted by an
intarctive teaching mechanism at every atep of the transaction, both with
the help of visual and audio help sessions.
User B: An experienced customer. This user has used an ATM on several
occasions before and does most of his account management through the
ATM. There is only a little help session that too at the beginning of the
session thus making the transaction procedure more faster.
Maintenance Personnel: A bank employee. This user is familiar with the
2.4 Constraints
The major constraints that the project has are as follows:-
The ATM must service at most one person at a time.
The number of invalid pin entries attempted must not exceed three. After
three unsuccessful login attempts, the card is seized/blocked and need to
be unlocked by the bank.
The simultaneous access to an account through both, the ATM and the
bank is not supported.
The minimum amount of money a user can withdraw is Rs 100/- and the
maximum amount of money a user can withdraw in a session is
Rs.10,000/- and the maximum amount he can withdraw in a day is Rs
20,000/-
Before the transaction is carried out, a check is performed by the machine
to ensure that a minimum amount of Rs 1000/- is left in the user’s account
after the withdrawal failing which the withdrawal is denied.
The minimum amount a user can deposit is Rs 100/- and the maximum
amount he can deposit is Rs 10,000/-.
A user can select only that cellular operator for mobile bill clearings that
is supported by the bank.
The software requires a minimum memory of 20GB
The databse used should be Oracle7.0.
There shall be a printer installed with the machine to provide the user with
the printed statement of the transaction.
For voice interactions, speakers should also be there to accompany the
machine.
2.5 Assumptions and Dependencies
The requirements stated in the SRS could be affected by the following factors:
One major dependency that the project might face is the changes that need to be
incorporated with the changes in the bank policies regarding different services. As
the policies changes the system needs to be updated with the same immediately. A
delay in doing the same will result to tremendous loss to the bank. So this should
be changed as and when required by the developer.
Another constraint relating to the operating environment is that we are specific to
Oracle Database.
The project could be largely affected if some amount is withdrawn from the
user’s account from the bank at the same time when someone is accessing that
account through the ATM machine. Such a condition shall be taken care of.
At this stage no quantitive measures are imposed on the software in terms of
speed and memory although it is implied that all functions will be optimized with
respect to speed and memory.
It is furthermore assumed that the scope of the package will increase considerably in
The following reports will be generated after each session dealt with in the
machine:-
1. The login time and logout time along with the user’s pin no and account
number is registered in the bank’s database.
2. The ATM’s branch ID through which the session is established is also
noted down in the bank’s database.
3. Various changes in the user’s account after the transactions,if any, are
reported in the database.
4. A printed statement is generated for the user displaying all the
transactions he performed.
Validity Checks
In order to gain access to the system, the user is required to enter his/her
correct user id/pin no and account no failing which his card may be blocked.
The user can access only one account at a time and can enter only one
account no.
Also if the user is an administrator, he is required to enter his login id in
order to access and change the facilities provided by the system.
Sequencing Information
The information about the users and their account should be entered into the
database prior to any of the transactions and the backup be maintained for all
account information
THEORY
Entity Relationship Diagrams are a major data modelling tool and will help organize the
data in your project into entities and define the relationships between the entities. This
process has proved to enable the analyst to produce a good database structure so that the
data can be stored and retrieved in a most efficient manner.
Entity
A data entity is anything real or abstract about which we want to store data. Entity types
fall into five classes: roles, events, locations, tangible things or concepts. E.g. employee,
payment, campus, book. Specific examples of an entity are called instances. E.g. the
employee John Jones, Mary Smith's payment, etc.
Relationship
A data relationship is a natural association that exists between one or more entities. E.g.
Employees process payments. Cardinality defines the number of occurrences of one
entity for a single occurrence of the related entity. E.g. an employee may process many
payments but might not process any payments depending on the nature of her job.
Attribute
A data attribute is a characteristic common to all or most instances of a particular entity.
Synonyms include property, data element, field. E.g. Name, address, Employee Number,
pay rate are all attributes of the entity employee. An attribute or combination of attributes
that uniquely identifies one and only one instance of an entity is called a primary key or
identifier. E.g. Employee Number is a primary key for Employee.
1. Identify Entities Identify the roles, events, locations, tangible things or concepts about
which the end-users want to store data.
2. Find Relationships Find the natural associations between pairs of entities using a relationship
matrix.
3. Draw Rough ERD Put entities in rectangles and relationships on line segments connecting the
entities.
4. Fill in Cardinality Determine the number of occurrences of one entity for a single occurrence
of the related entity.
5. Define Primary Keys Identify the data attribute(s) that uniquely identify one and only one
occurrence of each entity.
6. Draw Key-Based ERD Eliminate Many-to-Many relationships and include primary and foreign
keys in each entity.
7. Identify Attributes Name the information details (fields) which are essential to the system
under development.
8. Map Attributes For each attribute, match it with exactly one entity that it describes.
9. Draw fully attributed ERD Adjust the ERD from step 6 to account for entities or relationships
discovered in step 8.
4. Fill in Cardinality
From the description of the problem we see that:
Conclusion: The entity relationship diagram was made successfully by following the
steps described above.
THEORY
Data flow diagrams illustrate how data is processed by a system in terms of inputs and
outputs.
Process Notations
Datastore Notations
Dataflow
Dataflows are pipelines through which packets of information flow. Label the arrows
with the name of the data that moves through it.
Context Diagrams
A context diagram is a top level (also known as Level 0) data flow diagram. It only
contains one process node (process 0) that generalizes the function of the entire system in
relationship to external entities.
DFD levels
The first level DFD shows the main processes within the system. Each of these processes
can be broken into further processes until you reach pseudocode.
Conclusion: The dataflow diagram was made successfully by following the steps
described above.
Theory
According to the UML specification a use case diagram is “a diagram that shows the
relationships among actors and use cases within a system.” Use case diagrams are often
used to:
Provide an overview of all or part of the usage requirements for a system or
organization in the form of an essential model or a business model
Communicate the scope of a development project
Model your analysis of your usage requirements in the form of a system use case
model
Use case models should be developed from the point of view of your project stakeholders
and not from the (often technical) point of view of developers. There are guidelines for:
1. Use Cases
A use case describes a sequence of actions that provide a measurable value to an actor. A
use case is drawn as a horizontal ellipse on a UML use case diagram.
1. Use Case Names Begin With a Strong Verb
2. Name Use Cases Using Domain Terminology
3. Place Your Primary Use Cases In The Top-Left Corner Of The Diagram
4. Imply Timing Considerations By Stacking Use Cases.
2. Actors
An actor is a person, organization, or external system that plays a role in one or more
interactions with your system (actors are typically drawn as stick figures on UML Use
Case diagrams).
1. Place Your Primary Actor(S) In The Top-Left Corner Of The Diagram
2. Draw Actors To The Outside Of A Use Case Diagram
3. Name Actors With Singular, Business-Relevant Nouns
4. Associate Each Actor With One Or More Use Cases
5. Actors Model Roles, Not Positions
6. Use <<system>> to Indicate System Actors
7. Actors Don’t Interact With One Another
8. Introduce an Actor Called “Time” to Initiate Scheduled Events
3. Relationships
There are several types of relationships that may appear on a use case diagram:
An association between an actor and a use case
An association between two use cases
A generalization between two actors
A generalization between two use cases
Associations are depicted as lines connecting two modeling elements with an optional
open-headed arrowhead on one end of the line indicating the direction of the initial
invocation of the relationship. Generalizations are depicted as a close-headed arrow with
the arrow pointing towards the more general modeling element.
Object Oriented Software Engineering 32
Laboratory Manual
Conclusion: The use case diagram was made successfully by following the steps
described above.
Some Sample Use Case Diagrams are given below for illustration purpose:
Authenticati
User/ Searchin
Data
Administrat
Mobility
Signalling
Software Updation
Use Case Diagram for Bluetooth Software
Booking
login
Enquir
Employee y Administrator
Report
Resources
Update
Use Case Diagram for Resource Management
EXERCISE NO. 6
AIM :-
To draw a sample activity diagram for real project or system.
THEORY
UML 2 activity diagrams are typically used for business process modeling, for modeling
the logic captured by a single use case or usage scenario, or for modeling the detailed
logic of a business rule. Although UML activity diagrams could potentially model the
internal logic of a complex operation it would be far better to simply rewrite the
operation so that it is simple enough that you don’t require an activity diagram. In many
ways UML activity diagrams are the object-oriented equivalent of flow charts and data
flow diagrams (DFDs) from structured development.
Initial node. The filled in circle is the starting point of the diagram. An initial
node isn’t required although it does make it significantly easier to read the
diagram.
Activity final node. The filled circle with a border is the ending point. An
activity diagram can have zero or more activity final nodes.
Activity. The rounded rectangles represent activities that occur. An activity may
be physical, such as Inspect Forms, or electronic, such as Display Create Student
Screen.
Flow/edge. The arrows on the diagram. Although there is a subtle difference
between flows and edges,never a practical purpose for the difference although.
Fork. A black bar with one flow going into it and several leaving it. This
denotes the beginning of parallel activity.
Join. A black bar with several flows entering it and one leaving it. All flows
going into the join must reach it before processing may continue. This denotes
the end of parallel processing.
Condition. Text such as [Incorrect Form] on a flow, defining a guard which
must evaluate to true in order to traverse the node.
Decision. A diamond with one flow entering and several leaving. The flows
leaving include conditions although some modelers will not indicate the
conditions if it is obvious.
Merge. A diamond with several flows entering and one leaving. The implication
is that one or more incoming flows must reach this point until processing
continues, based on any guards on the outgoing flow.
Partition. If figure is organized into three partitions, it is also called swimlanes,
indicating who/what is performing the activities (either the Applicant, Registrar,
or System).
Sub-activity indicator. The rake in the bottom corner of an activity, such as in
the Apply to University activity, indicates that the activity is described by a more
finely detailed activity diagram.
Flow final. The circle with the X through it. This indicates that the process stops
at this point.
1. Place The Start Point In The Top-Left Corner. A start point is modeled with a
filled in circle, using the same notation that UML State Chart diagrams use.
Every UML Activity Diagram should have a starting point, and placing it in the
top-left corner reflects the way that people in Western cultures begin reading.
Figure1, which models the business process of enrolling in a university, takes this
approach.
2. Always Include an Ending Point. An ending point is modeled with a filled in
circle with a border around it, using the same notation that UML State Chart
diagrams use. Figure1 is interesting because it does not include an end point
because it describes a continuous process – sometimes the guidelines don’t apply.
3. Flowcharting Operations Implies the Need to Simplify. A good rule of thumb is
that if an operation is so complex you need to develop a UML Activity diagram to
understand it that you should consider refactoring it.
2. Activities
An activity, also known as an activity state, on a UML Activity diagram typically
represents the invocation of an operation, a step in a business process, or an entire
business process.
1. Question “Black Hole” Activities. A black hole activity is one that has transitions
into it but none out, typically indicating that you have either missed one or more
transitions.
2. Question “Miracle” Activities. A miracle activity is one that has transitions out of
it but none into it, something that should be true only of start points.
3. Decision Points
A decision point is modeled as a diamond on a UML Activity diagram.
1. Decision Points Should Reflect the Previous Activity. In figure1 we see that there
is no label on the decision point, unlike traditional flowcharts which would
include text describing the actual decision being made, we need to imply that the
decision concerns whether the person was enrolled in the university based on the
activity that the decision point follows. The guards, depicted using the format
[description], on the transitions leaving the decision point also help to describe
the decision point.
2. Avoid Superfluous Decision Points. The Fill Out Enrollment Forms activity in
FIGURE1 includes an implied decision point, a check to see that the forms are
filled out properly, which simplified the diagram by avoiding an additional
diamond.
4. Guards
A guard is a condition that must be true in order to traverse a transition.
Conclusion: The activity diagram was made successfully by following the steps
described above.
EXERCISE NO. 7
AIM: To prepare STATE CHART DIAGRAM for any project.
REQUIREMENTS:
Hardware Interfaces
Pentium(R) 4 CPU 2.26 GHz, 128 MB RAM
Screen resolution of at least 800 x 600 required for proper and complete viewing
of screens. Higher resolution would not be a problem.
CD ROM Driver
Software Interfaces
THEORY:
State Chart Diagrams provide a way to model the various states in which
an object can exist.
There are two special states: the start state and the stop state.
The Start state is represented by a block dot.
The Stop state is represented by a bull’s eye.
A condition enclosed in square brackets is called a guard
condition, and controls when a transition can or cannot occur.
Process that occur while an object is in certain state are called actions.
Now arrange the states to fill the diagram better. Drag the states to new positions
to make the easiest layout to work with.
Add an end state to the diagram by clicking the “END STATE” button. Place an
instance into the diagram. Now add relationships to the diagram.
Click on the “STATE TRANSITION” button and drag arrows between the
appropriate states.
To edit the specification secondary click on the relation lines and select “OPEN
SPECIFICATION” button. Add a name for the event in the specification. Then
click on “apply” and then on “OK” button.
Add details to the specifications of the other relationships in the same way.
There may be instances on the diagram where a state can join more than one state.
In this case add a relationship in the same way. Then enter the specification for
the new state.
Conclusion: The state chart diagram was made successfully by following the steps
described above.
EXERCISE NO. 8
Aim:
Steps to draw the Sequence Diagram
Theory:
UML sequence diagrams model the flow of logic within the system in a visual
manner, enabling the user both to document and validate the logic, and are
commonly used for both analysis and design purposes. Sequence diagrams
are the most popular UML artifact for dynamic modeling, which focuses on
identifying the behavior within your system. Sequence diagrams, along with
class diagrams and physical data models are the most important design-level
models for modern application development .
FIG .shows the logic for how to enroll in a seminar. One should often develop a system-
level sequence diagram to help both visualize and validate the logic of a usage scenario.
It also helps to identify significant methods/services, such as checking to see if the
applicant already exists as a student, which the system must support.
The dashed lines hanging from the boxes are called object lifelines, representing the life
span of the object during the scenario being modeled. The long, thin boxes on the
lifelines are activation boxes, also called method-invocation boxes, which indicate
processing is being performed by the target object/class to fulfill a message.
While creating a sequence diagram ,start by identifying the scope of what you are trying
to model.You should typically tackle small usage scenarios at the system level or a single
method/service at the detailed object level.
You should then work through the logic with at least one more person, laying out
classifiers across the top as you need them. . The heart of the diagram is in the messages,
which you add to the diagram one at a time as you work through the logic. You should
rarely indicate return values, instead you should give messages intelligent names which
often make it clear what is being returned.
It is interesting to note that as you sequence diagram you will identify new
responsibilities for classes and objects, and, sometimes, even new classes. The
implication is that you may want to update your class model appropriately, agile
modelers will follow the practice Create Several Models in Parallel, something that
CASE tools will do automatically. Remember, each message sent to a class invokes a
static method/operation on that class each message sent to an object invokes an operation
on that object.
Regarding style issues for sequence diagramming, prefer drawing messages going from
left-to-right and return values from right-to-left, although that doesn’t always work with
complex objects/classes. Justify the label on messages and return values, so they are
closest to the arrowhead. Also prefer to layer the sequence diagrams: from left-to-right.
indicate the actors, then the controller class(es), and then the user interface class(es), and,
finally, the business class(es). During design, you probably need to add system and
persistence classes, which you should usually put on the right-most side of sequence
diagrams. Laying your sequence diagrams in this manner often makes them easier to read
and also makes it easier to find layering logic problems, such as user interface classes
directly accessing persistence .
Procedure
Click on the File menu and select New.
Now from the Dialogue Box that appears ,select the language which you want to
use for creating your model.
Enter the name of new Sequence file in the space provided,and then click on
that file name.
You can now use the window that appears on right hand side to draw your Sequence
diagram using the buttons provided on the vertical toolbar.
Conclusion: The sequence diagram was made successfully by following the steps
described above.
Another example of a sequence diagram
:
User/BT
1: Access_ Request()
2:
3:
Access_Granted()
4:
Device_Search()
5:
Range_Check() 6:
Frequency_Selection()
7:
Signalling_Complete()
8: Results()
9:
10:
Transmitting()
11:
Acknowldegement()
EXERCISE NO. 9
THEORY:
A class diagram is a type of static structure diagram that describes the structure of a
system by showing the system's classes, their attributes, and the relationships between the
classes.
Class diagrams show the classes of the system, their inter-relationships, and the
operations and attributes of the classes. Class diagrams are typically used, although not
all at once, to:
Explore domain concepts in the form of a domain model
Analyze requirements in the form of a conceptual/analysis model
Depict the detailed design of object-oriented or object-based software
A class model is comprised of one or more class diagrams and the supporting
specifications that describe model elements including classes, relationships between
classes, and interfaces. There are guidelines
1. General issues
2. Classes
3. Interfaces
4. Relationships
5. Inheritance
6. Aggregation and Composition
GENERAL GUIDELINES
Because class diagrams are used for a variety of purposes – from understanding
requirements to describing your detailed design – it is needed to apply a different style in
each circumstance. This section describes style guidelines pertaining to different types of
class diagrams.
CLASSES
A class in the software system is represented by a box with the name of the class written
inside it. A compartment below the class name can show the class's attributes (i.e. its
properties). Each attribute is shown with at least its name, and optionally with its type,
initial value, and other properties.
A class is effectively a template from which objects are created (instantiated). Classes
define attributes, information that is pertinent to their instances, and operations,
functionality that the objects support. Classes will also realize interfaces (more on this
later).
Class diagrams are widely used to describe the types of objects in a system and their
relationships. Class diagrams model class structure and contents using design elements
such as classes, packages and objects. Class diagrams describe three different
perspectives when designing a system, conceptual, specification, and implementation.
These perspectives become evident as the diagram is created and help solidify the
design.
INTERFACES
RELATIONSHIPS
A relationship is a general term covering the specific types of logical connections found
on a class and object diagram.
Class diagrams also display relationships such as containment, inheritance, associations
and others.
The association relationship is the most common relationship in a class diagram. The
association shows the relationship between instances of classes.
AGGREGATION
Aggregation occurs when a class is a collection or container of other classes, but where
the contained classes do not have a strong life cycle dependency on the container--
essentially, if the container is destroyed, its contents are not.
ASSOCIATION
Association are semantic connection between classes. When an association connects two
classes , each class can send messages to other in a sequence or a collaboration diagram .
Associations can be bidirectional or unidirectional.
DEPENDENCIES
Dependencies connect two clases . Dependencies are always unidirectional and show that
one class, depends on the definitions in another class .
GENERALIZATION
The generalization relationship indicates that one of the two related classes (the
supertype) is considered to be a more general form of the other (the subtype). In practice,
this means that any instance of the subtype is also an instance of the supertype .
The generalization relationship is also known as the inheritance or "is a" relationship.
The subtype in the generalization relationship is also known as the "child", subclass,
derived class, derived type, inheriting class, or inheriting type.
MULTIPLICITY
The association relationship indicates that (at least) one of the two related classes makes
reference to the other.
EXERCISE NO. 10
AIM: To implement the design by coding.
EXERCISE NO. 11
AIM: To prepare test plan and test report by performing validation testing, coverage analysis,
develop test case hierarchy