Ooad File Btit604-Lab Manual
Ooad File Btit604-Lab Manual
Ooad File Btit604-Lab Manual
Index
S.No. Practical
Experiment 1:
Aim: To study the concepts of Object-Oriented Technology.
Introduction
The major motivating factor in the invention of object-oriented approach is to remove some
of the flaws encountered in the procedural approach. OOP treats data as a critical element in
the program development and does not allow it to flow freely around the system. It ties data
more closely to the function that operate on it, and protects it from accidental modification
from outside function. OOP allows decomposition of a problem into a number of entities
called objects and then builds data and function around these objects.
BTIT-604 Object Oriented Analysis and Design
History
The basis for OOP started in the early 1960s. A breakthrough involving instances and objects
was achieved at MIT with the PDP-1, and the first programming language to use objects was
Simula 67. It was designed for the purpose of creating simulations, and was developed by
Kristen Nygaard and Ole-Johan Dahl in Norway.
They were working on simulations that deal with exploding ships, and realized they could
group the ships into different categories. Each ship type would have its own class, and the
class would generate its unique behavior and data. Simula was not only responsible for
introducing the concept of a class, but it also introduced the instance of a class.
The term "object-oriented programming " was first used by Xerox PARC in their Smalltalk
programming language. The term was used to refer to the process of using objects as the
foundation for computation. The Smalltalk team was inspired by the Simula 67 project, but
they designed Smalltalk so that it would be dynamic. The objects could be changed, created,
or deleted, and this was different from the static systems that were commonly used. Smalltalk
was also the first programming language to introduce the inheritance concept. It is this
feature that allowed Smalltalk to surpass both Simula 67 and the analog programming
systems. While these systems were advanced for their time, they did not use the inheritance
concept.
Simula 67 was a ground-breaking system that has inspired a large number of other
programming languages, and some of these include Pascal and Lisp. By the 1980s,
object-oriented programming had become prominent, and the primary factor in this is C++.
Object oriented programming was also important for the development of Graphical user
interfaces. The Cocoa structure that exists within Mac OS X is a good example of a dynamic
GUI that works with an object-oriented programming language. This paradigm of
programming has also played an important role in the development of event-driven
programming.
Niklaus Wirth and his associates were looking at areas such as modular programming and
data abstraction, and they developed two systems which incorporated these elements. These
two systems are Oberon and Modula-2. Oberon used a unique approach to classes and object
orientation that is much different than C++ or Smalltalk. Since the introduction of OOP, a
large number of modern programming languages are now using the concept. Some of these
are Fortran, BASIC, and Pascal. There have been some compatibility issues, because many
programs were not designed with a OOPs approach in mind. Object oriented programming
languages that were "pure" did not have many of the functions that programmers needed.
To solve these problems, a number of researchers have been attempting to design new
programming languages that used object-oriented concepts but still retained many of the
functions that programmers needed. One example of a programming language that has
achieved this to some degree is Eiffel. Another programming language that has attempted to
solve this problem is Java. Java has become popular because it uses a virtual machine, and it
is very similar to C++ and C. The virtual machine is important because it allows code to be
run on multiple platforms without having to be changed. Another system that is similar is
Microsoft’s .NET. Many developers now understand the importance of OOP, and are actively
using it within their own programs. Many researchers have continued to make advancements
by using the object-oriented approach.
BTIT-604 Object Oriented Analysis and Design
BASIS FOR
POP OOP
COMPARISON
entities of a class.
Division Large program is divided into units Entire program is divided into
protected.
Data hiding & There is no proper way of hiding Data is hidden in three modes
Data sharing Global data is shared among the Data is shared among the
functions.
"friend".
C#.NET.
In analysis phase, OO models are used to fill the gap between problem and solution. It
performs well in situation where systems are undergoing continuous design, adaption, and
maintenance. It identifies the objects in problem domain, classifying them in terms of data
and behavior.
● Object
● Class
● Inheritance
● Polymorphism
● Abstraction
● Encapsulation
1. Object
Any entity that has state and behaviour is known as an object. For example, a chair, pen,
table, keyboard, bike, etc. It can be physical or logical. An Object can be defined as an
instance of a class. An object contains an address and takes up some space in memory.
Objects can communicate without knowing the details of each other's data or code. The only
necessary thing is the type of message accepted and the type of response returned by the
objects.
Example: A dog is an object because it has states like colour, name, breed, etc. as well as
behaviours like wagging the tail, barking, eating, etc.
BTIT-604 Object Oriented Analysis and Design
2. Class
Collection of objects is called class. It is a logical entity. A class can also be defined as a
blueprint from which you can create an individual object. Class doesn't consume any space.
3. Inheritance
When one object acquires all the properties and behaviours of a parent object, it is known as
inheritance. It provides code reusability. It is used to achieve runtime polymorphism.
4. Polymorphism
BTIT-604 Object Oriented Analysis and Design
5. Abstraction
6. Encapsulation
Binding (or wrapping) code and data together into a single unit are known as encapsulation.
For example, a capsule, it is wrapped with different medicines. A java class is the example of
encapsulation. Java bean is the fully encapsulated class because all the data members are
private here.
Advantages of OOP
1. Re-usability
It means reusing some facilities rather than building it again and again. This is
done with the use of a class. We can use it ‘n’ number of times as per our need.
2. Data Redundancy
This is a condition created at the place of data storage (you can say Databases)
where the same piece of data is held in two separate places. So, the data
3. Code Maintenance
This feature is more of a necessity for any programming languages, it helps users
BTIT-604 Object Oriented Analysis and Design
from doing re-work in many ways. It is always easy and time-saving to maintain
and modify the existing codes with incorporating new changes into it.
4. Security
With the use of data hiding and abstraction mechanism, we are filtering out limited
data to exposure which means we are maintaining security and providing necessary
data to view.
5. Design Benefits
If you are practicing on OOPs the design benefits a user will get is in terms of
designing and fixing things easily and eliminating the risks (if any). Here the
design phase, which results in better designs and fewer flaws. After a time when
the program has reached some critical limits, it is easier to program all the
user’s overall productivity. This leads to more work done, finish a better program,
having more inbuilt features and easier to read, write and maintain. An OOP
programmer cans stitch new software objects to make completely new programs. A
7. Easy troubleshooting
This is the advantage of using encapsulation in OOP; all the objects are
self-constrained. With this modality behavior, the IT teams get a lot of work
benefits as they are now capable to work on multiple projects simultaneously with
8. Polymorphism Flexibility
Let’s see a scenario to better explain this behavior. You behave in a different way if
the place or surrounding gets change. A person will behave like a customer if he is
BTIT-604 Object Oriented Analysis and Design
in a market, the same person will behave like a student if he is in a school and as a
son/daughter if put in a house. Here we can see that the same person showing
different behavior every time the surroundings are changed. This means
● It’s simplicity
● Extensibility
9. Problems solving
Decomposing a complex problem into smaller chunks or discrete components is a
good practice. OOP is specialized in this behavior, as it breaks down your software
code into bite-sized – one object at a time. In doing this the broken components can
be reused in solutions to different other problems (both less and more complex) or
either they can be replaced by the future modules which relate to the same interface
level a car can be decomposed into wheels, engine, a chassis soon and each of
those components can be further broken down into even smaller atomic
components like screws and bolts. The engine’s design doesn’t need to know
anything about the size of the tires in order to deliver a certain amount of power (as
Experiment 2:
Aim: Write a problem statement of your application domain.
What is a Problem Statement?
A problem statement is usually one or two sentences to explain the problem your process
improvement project will address. In general, a problem statement will outline the negative
points of the current situation and explain why these matters. It also serves as a great
communication tool, helping to get buy-in and support from others.
Problem statements are widely used by most businesses and organizations to execute
process improvement projects. A simple and well-defined problem statement will be used by
the project team to understand the problem and work toward developing a solution. It will
also provide management with specific insights into the problem so that they can make
appropriate project-approving decisions. As such, it is crucial for the problem statement to be
clear and unambiguous.
The problem statement is referenced throughout the project to establish focus within the
project team and verify they stay on track. At the end of the project, it is revisited to confirm
the implemented solution indeed solves the problem. A well-defined problem statement can
also aid in performing root-cause analysis to understand why the problem occurred and
ensure measures can be taken to prevent it from happening in the future.
It is important to note that the problem statement does not define the solution or methods of
reaching the solution. The problem statement simply recognizes the gap between the problem
and goal states. It can be said that “a problem well stated is half solved”. However, there are
BTIT-604 Object Oriented Analysis and Design
often multiple, viable solutions to a problem. Only after the problem statement is written and
agreed upon should the solution(s) be discussed and the resulting course of action
determined.
One of the most important goals of any problem statement is to define the problem being
addressed in a way that's clear and precise. Its aim is focusing the process improvement
team’s activities and steer the scope of the project.
1. IDEAL: This section is used to describe the desired or “to be” state of the
process or product. It identifies the goals of the stakeholders and customers as
well as assists in defining scope. At large, this section should illustrate what
the expected environment would look like once the solution is implemented.
2. REALITY: This section is used to describe the current or “as is” state of the
process or product. It explains the pain points expressed by the stakeholders
and customers. It should also include the insights and expertise of the project
team and subject matter experts provided during problem analysis.
3. CONSEQUENCES: This section is used to describe the impacts on the
business if the problem is not fixed or improved upon. This includes costs
associated with loss of money, time, productivity, competitive advantage, and
so forth. The magnitude of these effects will also help determine the priority
of the project.
4. PROPOSAL: This section is used to describe potential solutions. Once the
ideal, reality, and consequences sections have been completed, understood,
and approved, the project team can start offering options for solving the
problem. It can also include suggestions by the stakeholders and customers,
although further discussions and research will be needed before a specific
course of action can be determined.
One should be able to apply the 5 'W's (Who, What, Where, When and Why) to the problem
statement. A problem statement can be refined as we start to further investigate root cause.
Finally, review your new problem statement against the following criteria:
BTIT-604 Object Oriented Analysis and Design
Experiment 3:
Aim: To perform the system analysis: Requirement Analysis and
SRS.
Introduction
Cab booking service is a major transport service provided by the various transport operators
in a particular city. Mostly peoples use cab service for their daily transportation's need. The
company must be a registered and fulfills all the requirements and security standards set by
the transport department.
In a nutshell your Taxi Booking Software should be able to:
o Provide the functionality to make your own bookings
o Give your customers the facility to make payments and deposits online with their credit /
debit card.
o Generate Invoice so Update your web site without the need to get a web designer involved.
o Provide the customer with taxi availability
o Track your customers.
o Engage your customers through interaction such as feedback forms
Purpose
The purpose of this case study is to describe the cab booking system which provides the cab
booking details, billing, and cancellation on various types of booking namely.
▪ Confirm booking.
▪ Online booking.
▪ Phone booking.
1. Cab Details
2. Booking Form
3. Billing
4. Cancellation
Scope
▪ Passenger Revenue Enhancement.
▪ Improved and Optimized service
System Development Life Cycle
The systems development life cycle is a project management technique that divides complex
projects into smaller, more easily managed segments or phases. Segmenting projects allows
managers to verify the successful completion of project phases before allocating resources to
subsequent phases. Software development projects typically include initiation, planning,
design, development, testing, implementation, and maintenance phases. However, the phases
may be divided differently depending on the organization involved. For example, initial
project activities might be designated as request, requirements-definition, and planning
phases, or initiation, concept-development, and planning phases. End users of the system
under development should be involved in reviewing the output of each phase to ensure the
system is being built to deliver the needed functionality.
Overall description
It enables us to maintain the cab details like this
Product Perspective
Their timing number of seat available, and booking billing and cancelling the cab.
User Interface
Mobile Application, tablets
Development Hardware Interface
Minimum system requirements for Cab Management:
Processor
Intel Core 2Duo or AMD equivalent, 2Gz or better
RAM
2GB
HDD
160 GB, 7200k spin
Operating systems used in development
Windows XP sp3 / Windows 7
BTIT-604 Object Oriented Analysis and Design
SOFTWARE INTERFACE
Front end -> C#, WCF, MapsAPi
Back end -> MSSql
UserApp -> Mobile Interface
Communication Interfaces
The website www.uber.com offers CBS enquiries on the internet availability, status ,
fare,service area etc.
Mobile based inquiry service.
Setting up of voice response system.
Operating Environment
The OS types are:
Windows Phone, iPhone, blackberry,Android
BTIT-604 Object Oriented Analysis and Design
Operations
Any booking can be done 24 hours.
One form for single booking.
Booking is done through pre-defined logic.
Product Functions
It tells the short note about the product.
Cab Details
Customers may view the cab timing at a date their name and their type of booking.
Booking
After checking the number of cab available the customers book a cab or number of cabs
according to their requirements.
Billing
After reserving the required cab, the customer pays the amount in advance(optional).
Cancelation
If the customer wants to cancel the cab then 10% of the amount per person is deducted if the
booking is cancelled before 30 mins of the service time.
User characteristics
Knowledge userNo voice userExpert user
Conscabts
Less than 1 sec for local transactions.
3 sec for network transaction.
Uptime of CBS is 99.5+%. SOFTWARE CONSCABTS:Designing->Rational Rose
❖ SPECIFIC REQUIREMENTS
EXTERNAL INTERFACES
Cab Delay Alert Service.Booking Terminals Interactive voice Response System.
PERFORMANCE REQUIREMENTS:
BTIT-604 Object Oriented Analysis and Design
Integration Testing
Integration testing is a systematic technique for constructing the program structures, while
conducting test to uncover errors associated with interfacing, the objective is to take unit
tested modules and build a program structure that has been dictated by design. User interface
of i-Admit was developed in modules. All of them were joined together to make the complete
running application. While integrating these modules, integration testing was performed on
them to verify that they meet all interfacing requirements and that they pass relevant
information among themselves. In the end the complete program structure was tested to
ensure interoperability of all the modules.
Validation Testing
At the culmination of integration testing software is completely assembled as a
package: interfacing errors have been uncovered and corrected and a final series of
software tests
–Validation Testing may begin. Validation can be defined in many ways, but a simple
definition is that validation succeeds when software functions in a manner that can be
reasonably expected by the customer. Software validation is achieved through a series of
BlackBox tests that demonstrate conformity with requirements.
Alpha Testing
It is virtually impossible for a software developer to foresee how the customer will really use
a program. When custom software is built for one customer a series of acceptance tests are
conducted to enable the customer to validate all requirements. A customer conducts the
alpha test at the developer site. The software is used in a natural setting with the developer
“lookingover the shoulder” of the user and recording errors and usage problem. Alpha tests
are conducted in a controlled environment. Alpha tests were performed at our development
site with the help of our friends, who were called and asked to run the program in the manner
they like, without our guidance and errors and usage problems were noted and code was
updated toremove all of them.
Beta Testing
The Beta test is conducted at one or more customer sites by the end user of the software.
Unlike alpha testing the developer is generally not present. Therefore the beta test is a live
application of the software in an environment that cannot be controlled by the developer.
The customer records all problems that are encountered during beta testing and reports these
to the developer at regular intervals. As a result of problems reported during beta test the
software developer makes modification and then prepares for the release of software product
to the entire customer base. Beta testing of our system is not performed as the product is not
yet
BTIT-604 Object Oriented Analysis and Design
fully developed and has not been installed at the user site as it still is in the development phase.
Beta testing will be performed when the software is
deployed at the user’s site.
System Testing
Ultimately software is incorporated with other system elements (new hardware,
information) and a series of system, integration and validation tests are conducted. It is
actually a series of different tests whose primary purpose is to fully exercise the computer-
based system.
Although each test has a different purpose all work to verify that all system elements have
been properly integrated and perform allocated functions. System testing of this system
was performed at the development lab of this system by integrating the functional systems
to imitate the actual work environment. Since no special hardware was needed for this
purpose,the testing proceeded and succeeded with no errors.
Recovery Testing
Many computer-based systems must recover from faults and resume processing within a
pre-specified time. In some cases a system must be fault tolerant that is processing faults
must not cause overall system function to cease. Recovery testing is a system test that forces
the software to fail in a variety of ways and verifies that recovery is properly performed. If
recovery is automatic, re-initialization, check pointing mechanism, data recovery, and restart
are each evaluated for correctness. If recovery requires human intervention the meantime to
repair is evaluated to determine whether it is within acceptable limits.
Security Testing
Security Testing attempts to verify protection mechanism built into system will in fact protect
it from improper penetration. Security is provided for each user by giving them their login
name and password. Security testing was done, as any other anonymous user can’t log in with
a user password if the user is already logged in.
Performance Testing
Performance Testing is designed to test run time performance of software within the
context of an integrated system. Performance Testing occurs throughout all steps in the
testing process. Performance tests are often coupled with stress testing and often require
both hardware and software instrumentation. That is it is often necessary to measure
resource utilization in an exacting fashion. External instrumentation can monitor execution
intervals, log events as they occur, and sample machines take on a regular Basis. By
instrumenting a system the tester can uncover situations that lead to degradation and
possible system failure.
BTIT-604 Object Oriented Analysis and Design
Experiment 4:
Aim: To study about the Use Case Model and draw it.
Introduction
A use case is a methodology used in system analysis to identify, clarify and organize system
requirements. The use case is made up of a set of possible sequences of interactions between
systems and users in a particular environment and related to a particular goal. The method
creates a document that describes all the steps taken by a user to complete an activity.
Use cases are typically written by business analysts and can be employed during several
stages of software development, such as planning system requirements, validating design,
testing software and creating an outline for online help and user manuals. A use case
document can help the development team identify and understand where errors may occur
during a transaction so they can resolve them.
Every use case contains three essential elements:
● The actor. The system user -- this can be a single person or a group of people
interacting with the process.
● The goal. The final successful outcome completes the process.
● The system. The process and steps taken to reach the end goal, including the
necessary functional requirements and their anticipated behaviors.
Characteristics of use case
Use cases describe the functional requirements of a system from the end user's perspective,
creating a goal-focused sequence of events that is easy for users and developers to follow. A
complete use case will include one main or basic flow and various alternate flows. The
alternate flow, also known as an extending use case, describes normal variations to the basic
flow as well as unusual situations.
A business use case is a more abstract description that's written in a technology-agnostic way,
referring only to the business process being described and the actors that are involved in the
activity. A business use case identifies the sequence of actions that need to be performed by
the business to provide a meaningful, observable result to the end user.
On the other hand, a system use case is written with more detail than a business use case,
referring to the specific processes that must happen in various parts of the system to reach the
BTIT-604 Object Oriented Analysis and Design
final user goal. A system use case diagram will detail functional specifications, including
dependencies, necessary internal supporting features and optional internal features.
When writing a use case, the design scope should be considered to identify all elements that
lie within and outside the boundaries of the processes. Anything essential to the use case that
lies outside its boundaries should be indicated with a supporting actor or by another use case.
The design scope can be a specific system, a subsystem or the entire enterprise. Use cases
that describe business processes are typically of the enterprise scope.
As mentioned, the three basic elements that make up a use case are actors, the system and the
goal. Other additional elements to consider when writing a use case include:
● Stakeholders, or anybody with an interest or investment in how the system
performs.
● Preconditions, or the elements that must be true before a use case can occur.
● Triggers, or the events that cause the use case to begin.
● Post-conditions, or what the system should have completed by the end of the
steps.
The use case is written using narrative language, describing the functional requirements of a
system from the end user's perspective. A use case diagram is created using a unified
modeling language, with each step represented by its name in an oval; each actor represented
by a stick figure with their name written below; each action indicated by a line between the
actor and step; and the system boundaries indicated by a rectangle around the use case.
1. Identifying all system users and creating a profile for each one. This includes
every role played by a user who interacts with the system.
2. Selecting one user and defining their goal -- or what the user hopes to accomplish
by interacting with the system. Each of these goals becomes a use case.
3. Describing the course taken for each use case through the system to reach that
BTIT-604 Object Oriented Analysis and Design
goal.
4. Considering every alternate course of events and extending use cases -- or the
different courses that can be taken to reach the goal.
5. Identifying commonalities in journeys to create common course use cases and
write descriptions of each.
6. Repeating steps two through five for all other system users.
When writing a use case, developers may use a sequence diagram -- which shows how
objects react along a timeline -- to model the interactions between objects in a single use
case. Sequence diagrams allow developers to see how each part of the system interacts with
others to perform a specific function as well as the order in which these interactions occur to
complete a use case.
● The list of goals created in the use case writing process can be used to establish
the complexity and cost of the system.
● By focusing both on the user and the system, real system needs can be identified
earlier in the design process.
● Since use cases are written primarily in a narrative language they are easily
understood by stakeholders, including customers, users and executives -- not just
by developers and testers.
● The creation of extending use cases and the identification of exceptions to
successful use case scenarios saves developers time by making it easier to define
subtle system requirements.
● By identifying system boundaries in the design scope of the use case, developers
can avoid scope creep.
● Premature design can be avoided by focusing on what the system should do rather
than how it should do it.
In addition, use cases can be easily transformed into test cases by mapping the common
course and alternate courses and gathering test data for each of the scenarios. These
functional test cases will help the development team ensure all functional requirements of the
system are included in the test plan.
Furthermore, use cases can be used in various other areas of software development, including
project planning, user documentation and test case definitions. Use cases can also be used as
a planning tool for iterative development.
BTIT-604 Object Oriented Analysis and Design
BTIT-604 Object Oriented Analysis and Design
Experiment 5:
Aim: Draw State Diagram for your Project Domain.
A state diagram is used to represent the condition of the system or part of the system at finite
instances of time. It’s a behavioral diagram and it represents the behavior using finite state
transitions. State diagrams are also referred to as State machines and State-chart Diagrams.
These terms are often used interchangeably. So simply, a state diagram is used to model the
dynamic behavior of a class in response to time and changing external stimuli. We can say
that each and every class has a state but we don’t model every class using State diagrams. We
prefer to model the states with three or more states.
Uses of state chart diagram –
● We use it to state the events responsible for change in state (we do not
show what processes cause those events).
● We use it to model the dynamic behavior of the system .
● To understand the reaction of objects/classes to internal or external
stimuli.
Basic components of a state chart diagram –
1. Initial state – We use a black filled circle to represent the initial state
of a System or a class.
6. Self transition – We use a solid arrow pointing back to the state itself
to represent a self transition. There might be scenarios when the state of the
object does not change upon the occurrence of an event. We use self
transitions to represent such cases.
BTIT-604 Object Oriented Analysis and Design
Experiment 6:
Aim: Draw Activity Diagram for your Project Domain.
An activity diagram portrays the control flow from a start point to a finish point
showing the various decision paths that exist while the activity is being executed. We
can depict both sequential processing and concurrent processing of activities using an
activity diagram. They are used in business and process modelling where their
primary use is to depict the dynamic aspects of a system.
3. Action Flow or Control flows – Action flows or Control flows are also
referred to as paths and edges. They are used to show the transition from one
activity state to another.
7. Join – Join nodes are used to support concurrent activities converging into
one. For join notations we have two or more incoming edges and one outgoing
edge.
8. Final State or End State – The state which the system reaches when a
particular process or activity ends is known as a Final State or End State. We use a
filled circle within a circle notation to represent the final state in a state machine
diagram. A system or a process can have multiple final states.
BTIT-604 Object Oriented Analysis and Design
BTIT-604 Object Oriented Analysis and Design
Experiment 7:
Aim: Draw Sequence Diagram for your Project Domain.
Unified Modelling Language (UML) is a modeling language in the field of software
engineering which aims to set standard ways to visualize the design of a system. UML guides
the creation of multiple types of diagrams such as interaction , structure and behavior
diagrams.
A sequence diagram is the most used interaction diagram.
Interaction diagram –
An interaction diagram is used to show the interactive behavior of a system. Since
visualizing the interactions in a system can be a cumbersome task, we use different types of
interaction diagrams to capture various features and aspects of interaction in a system.
Sequence Diagrams –
A sequence diagram simply depicts interaction between objects in a sequential order i.e. the
order in which these interactions take place. We can also use the terms event diagrams or
event scenarios to refer to a sequence diagram. Sequence diagrams describe how and in what
order the objects in a system function. These diagrams are widely used by businessmen and
software developers to document and understand requirements for new and existing systems.
Figure – lifeline
We display a lifeline in a rectangle called head with its name and type. The head is
located on top of a vertical dashed line (referred to as the stem) as shown above. If
we want to model an unnamed instance, we follow the same pattern except now
the portion of lifeline’s name is left blank.
Difference between a lifeline and an actor – A lifeline always portrays an object
internal to the system whereas actors are used to depict objects external to the
system. The following is an example of a sequence diagram:
BTIT-604 Object Oriented Analysis and Design
For example: In order to be able to withdraw cash, having a balance greater than
zero is a condition that must be met as shown below.
● Used to model and visualize the logic behind a sophisticated function, operation
orprocedure.
● They are also used to show details of UML use case diagrams.
● Used to understand the detailed functionality of current or future systems.
● Visualize how messages and tasks move between objects or components in a
system.
BTIT-604 Object Oriented Analysis and Design
Experiment 8:
Aim: Perform the function-oriented diagram: Data Flow
Diagram.
DFD is the abbreviation for Data Flow Diagram. The flow of data of a system or a process
is represented by DFD. It also gives insight into the inputs and outputs of each entity and the
process itself. DFD does not have control flow and no loops or decision rules are present.
Specific operations depending on the type of data can be explained by a flowchart. Data Flow
Diagram can be represented in several ways. The DFD belongs to structured-analysis
modeling tools. Data Flow diagrams are very popular because they help us to visualize the
major steps and data involved in software-system processes.
Components of DFD
The Data Flow Diagram has 4 components:
● Process
Input to output transformation in a system takes place because of process function.
The symbols of a process are rectangular with rounded corners, oval, rectangle or
a circle. The process is named a short sentence, in one word or a phrase to express
its essence
● Data Flow
Data flow describes the information transferring between different parts of the
systems. The arrow symbol is the symbol of data flow. A relatable name should be
given to the flow to determine the information which is being moved. Data flow
also represents material along with information that is being moved. Material
shifts are modeled in systems that are not merely informative. A given flow
should only transfer a single type of information. The direction of flow is
represented by the arrow which can also be bi-directional.
● Warehouse
The data is stored in the warehouse for later use. Two horizontal lines represent
the symbol of the store. The warehouse is simply not restricted to being a data file
rather it can be anything like a folder with documents, an optical disc, a filing
cabinet. The data warehouse can be viewed independent of its implementation.
When the data flow from the warehouse it is considered as data reading and when
data flows to the warehouse it is called data entry or data updation.
● Terminator
The Terminator is an external entity that stands outside of the system and
communicates with the system. It can be, for example, organizations like banks,
groups of people like customers or different departments of the same organization,
which is not a part of the model system and is an external entity. Modeled systems
also communicate with terminator.
BTIT-604 Object Oriented Analysis and Design
Experiment 9:
Aim: To perform structural view analysis of class and object
diagram.
Class diagram is a static diagram. It represents the static view of an application. Class
diagram is not only used for visualizing, describing, and documenting different aspects of a
system but also for constructing executable code of the software application.
Class diagram describes the attributes and operations of a class and also the constraints
imposed on the system. The class diagrams are widely used in the modeling of object-
oriented systems because they are the only UML diagrams, which can be mapped directly
with object-oriented languages.
Class diagram shows a collection of classes, interfaces, associations, collaborations, and
constraints. It is also known as a structural diagram.
Purpose of Class Diagrams
The purpose of class diagram is to model the static view of an application. Class diagrams
are the only diagrams which can be directly mapped with object-oriented languages and thus
widely used at the time of construction.
UML diagrams like activity diagram, sequence diagram can only give the sequence flow of
the application, however class diagram is a bit different. It is the most popular UML diagram
in the coder community.
The purpose of the class diagram can be summarized as −
● Analysis and design of the static view of an application.
● Describe responsibilities of a system.
● Base for component and deployment diagrams.
● Forward and reverse engineering.
o Upper Section: The upper section encompasses the name of the class. A class isa
representation of similar objects that shares the same relationships, attributes,
operations, and semantics. Some of the following rules that should be taken into
account while representing a class are given below:
1. The attributes are written along with its visibility factors, which are public (+), private
(-), protected (#), and package (~).
2. The accessibility of an attribute class is illustrated by the visibility factors.
3. A meaningful name should be assigned to the attribute, which will explain its
usage inside the class.
o Lower Section: The lower section contain methods or operations. The methods are
represented in the form of a list, where each method is written in a single line. It
demonstrates how a class interacts with data.
Relationships
The company encompasses a number of employees, and even if one employee resigns, the
company still exists.
A contact book consists of multiple contacts, and if you delete the contact book, all the
contacts will be lost.
Abstract Classes
In the abstract class, no objects can be a direct entity of the abstract class. The abstract class
can neither be declared nor be instantiated. It is used to find the functionalities across the
classes. The notation of the abstract class is similar to that of class; the only difference is that
the name of the class is written in italics. Since it does not involve any implementation for a
given function, it is best to use the abstract class with multiple objects.
Let us assume that we have an abstract class named displacement with a method declared
inside it, and that method will be called as a drive (). Now, this abstract class method can be
implemented by any object, for example, car, bike, scooter, cycle, etc.
BTIT-604 Object Oriented Analysis and Design
An Object Diagram can be referred to as a screenshot of the instances in a system and the
relationship that exists between them. Since object diagrams depict behaviour when objects
have been instantiated, we are able to study the behavior of the system at a particular instant.
Object diagrams are vital to portray and understand functional requirements of a system.
In other words, “An object diagram in the Unified Modeling Language (UML), is a diagram
that shows a complete or partial view of the structure of a modeled system at a specific
time.”
Difference between an Object and a Class Diagram –
An object diagram is similar to a class diagram except it shows the instances of classes in the
system. We depict actual classifiers and their relationships making the use of class diagrams.
On the other hand, an Object Diagram represents specific instances of classes and
relationships between them at a point of time.
What is a classifier?
In UML a classifier refers to a group of elements that have some common features like
methods, attributes and operations. A classifier can be thought of as an abstract metaclass
which draws a boundary for a group of instances having common static and dynamic
features. For example, we refer a class, an object, a component, or a deployment node as
classifiers in UML since they define a common set of properties.
An Object Diagram is a structural diagram which uses notation similar to that of class
diagrams. We are able to design object diagrams by instantiating classifiers.
Object Diagrams use real world examples to depict the nature and structure of the system
at a particular point in time. Since we are able to use data available within objects, Object
diagrams provide a clearer view of the relationships that exist between objects.
1 One only
* Zero or more
7 Seven only
BTIT-604 Object Oriented Analysis and Design
Association and dependency are often confused in their usage. A source of confusion was the
use of transient links in UML 1. Meta-models are now handled differently in UML 2 and the
issue has been resolved.
There are a large number of dependencies in a system. We only represent the ones which are
essential to convey for understanding the system. We need to understand that every
association implies a dependency itself. We , however, prefer not to draw it separately. An
association implies a dependency similar to a way in which generalization does.