Assignment No: - 2 Ques:1. Describe Object Oriented Analysis (OOA) ? Ans:1
Assignment No: - 2 Ques:1. Describe Object Oriented Analysis (OOA) ? Ans:1
Assignment No: - 2 Ques:1. Describe Object Oriented Analysis (OOA) ? Ans:1
Functionalities of OOA
The core activities in OOA are given bellow:
o Find the objects/Identify the objects: -
▪ Using concepts, CRC cards, etc.
o Organize the objects by creating object model diagram: -
▪ Classifying the objects identified, so similar objects can later be defined in the same class.
o Explain how the objects communicates with each other/Identifying relationships b/w objects:
▪ This helps to determine input and output of an objects.
o Set the characteristic or behavior of the objects/Defining operations of the objects: -
▪ The way of processing of the objects.
o Set the internal of the objects/Defining objects internally: -
▪ Information held within the objects.
Advantages of OOA
The OOA provides better performance. Some common advantages of OOA are given bellow:
o Its focuses on data rather than the procedures as in Structured Analysis
o The objectives of encapsulation and data hiding help the developer to develop the systems that
cannot be tampered by other parts of the system
o It allows effective software complexity management by the virtue of modularity
o It can be upgraded from small to large system easily.
1
Ques:2. Describe Object Oriented Design (OOD)?
Ans:2 Object Oriented Design (OOD) serves as part of the object-oriented programming (OOP) process of
lifestyle. It is mainly the process of using an object methodology to design a computing system or application.
This technique enables the implementation of a software based on the concepts of objects. Additionally, it is
a concept that forces programmers to plan out their code in order to have a better flowing program.
The origins of Object-Oriented Design (OOD) is debated, but the first languages that supported it included
Simula and SmallTalk. The term did not become popular until Grady Booch wrote the first paper titled Object-
Oriented Design, in 1982. The chief objective of this type of software design is to define the classes and their
relationships, which are needed to build a system that meets the requirements contained in the Software
Requirement Specifications.
Moreover, it is the discipline of defining the objects and their interactions to solve a problem that was identified
and documented during the Object-Oriented Analysis (OOA). In short, Object Oriented Design (OOD) is a
method of design encompassing the process of object-oriented decomposition and a notation for depicting
both logical and physical models of the system under design.
2
Ques:3 What is Object-Oriented Metrics and describe all the C & K metrics.
Ans:3 Object-oriented metrics describe aspects of object-oriented programming. Object oriented Metrics
support the main concepts of the object-oriented paradigm and the consequent emphasis on reuse, that are
believed to be responsible for the increasing in software quality and development productivity.
Types of OO Metrics:
1. CK Metrics
• Proposed by Chidamber and Kemerer.
• class-based metrics.
2. LK Metrics
• Proposed by Lorenz and Kidd.
• class-based and operation-based.
3. MOOD Metrics
• Proposed by Harrison, Counsell, and Nithi.
• class-based.
CK Metrics
CK metrics in 1991, Chidamber and Kemerer proposed a first version of these metrics and later the
definition of some of them were improved and presented in 1994.
It is related to the number of non-inherited classes with which a particular class is coupled. Such number
reflects the degree of interdependence between the object-oriented system components. However, class X is
coupled to class Y if and only if X sends a message to Y; that is, a method of one class use methods or
instances variables of another class.
CBO = number of classes to which a class is coupled
It represents the number of methods of a class and the number of invoked methods by those class methods.
It measures the degree of communication between the classes of the system.
RFC = M + R (First-step measure)
RFC’ = M + R’ (Full measure)
M = number of methods in the class
R = number of remote methods directly called by methods of the class
R’ = number of remote methods called, recursively through the entire call tree
The use of RFC’ should be preferred over RFC. RFC was originally defined as a first-level metric because it
was not practical to consider the full call tree in manual calculation. With an automated code analysis tool,
getting RFC’ values are no longer problematic. As RFC’ considers the entire call tree and not just one first
level of it, it provides a more thorough measurement of the code executed.
It is the number of pairs of methods which do not share instance variable, minus the number of pairs of
methods that share instance variables of the class.
LCOM=The number of methods in a given class that access one or more of the same instance
variables.
3
4. Weighted Methods per Class (WMC):
It represents the sum of the complexities of all methods of a class. If all the complexities of all methods are
ones, then WMC is the number of class methods.
WMC = number of methods defined in class
It measures the level number for a class in the inheritance tree. DIT of the root class in the inheritance tree is
equal to zero.
DIT = maximum inheritance path from the class to the root class
It measures the number of direct subclasses of a class (the children). Moreover, if the subclasses are
dependent of their superclass (methods or instance variables), any changes to the superclass may affect the
subclasses, and therefore, the harder is the superclass maintainability.
NOC = number of immediate sub-classes of a class
Objective of CK metrics: - were defined to measure design complexity in relation to their impact on
external quality attributes such as maintainability, reusability, etc.
4
Ques:4 Describe Object-Oriented paradigms (abstraction and encapsulation only) by writing source
code in any object-oriented programming language.
Ans:4 BRIEF HISTORY: -
Object-Oriented paradigm was developed in 1960 by researchers. At the Norwegian Computing center as a
result of SIMULA (SIMULATION OF REAL SYSTEMS). The first pure OOPL: SMALLTALK was developed
in 1970 by Alan Kay and his researchers at Xerox park. In accordance with the Kay’s development of the first
OOPL Bjarne Stroustrup extended the C Program, C++ that used the object-oriented concept.
Elements of OOP: -
• Objects
• Classes
• Encapsulation
• Data Abstraction
• Inheritance
• Polymorphism
• Dynamic Binding
• Message Passing
Definition for Abstraction: - Data abstraction is one of the most essential and important features of
object-oriented programming in C++. Abstraction means displaying only essential information and hiding
the details. Data abstraction refers to providing only essential information about the data to the outside
world, hiding the background details or implementation.
5
By making these data members private, they have become hidden them from outside world. These data
members are not accessible outside the class. The only way to set and get them values is through the public
functions.
Definition for Encapsulation: Encapsulation is defined as wrapping up of data and information under a
single unit. In Object Oriented Programming, Encapsulation is defined as binding together the data and
the functions that manipulates them.
The variable can be accessed and manipulated only using the functions get() and set() which are present
inside the class. Thus we can say that here, the variable x and the functions get() and set() are binded
together which is nothing but encapsulation.
6
Ques:5 Explain the Object-Oriented Case Tools.
Ans:5 CASE Tools (Computer Aided Software Engineering Tools)
It refers to the collection of software programs that are designed to automate the development cycle. The
implementation of new systems requires many different complex tasks to be organized and completed
correctly and efficiently. Information generated has to be kept in synchronization. The use of CASE tools
eases the task of coordinating these activates from analysis to implementation
Development of CASES in the early days of writing software there has been a need for automated tools
to help the software developer as computer became more powerful and the software that ran on them
grew larger and more complex, power tools with increasing functionality were required.
These are basically general-purpose analysis and design specification tools. During the initial stages of
system development, analysts have to determine system requirements and analyze this information to
design the most effective system. Computerized CASE tools allow for changes to be made automatically,
very quickly and accurately. Data Dictionaries are data processing systems products that are specifically
7
designed to hold, maintain and organize information. They have facilities for producing a variety of
reports. They allow developers to be more productive. The goal of a CASE tool is to refine the analysis
and design stages to allow automated production of code, around 75%.
Data Dictionaries: - A data dictionary is an automated tool for collecting and organizing detailed
information about system components. A data dictionaries main facility is to document data elements,
records, programs, files, users etc. They also have the facility to cross-reference all system components
and contain details of: Systems environment. Audit trails Reports Forms Functions Processes.
These focus on the architecture of the system and its implementation and maintenance. These tools are
effective in helping with the generation of the program code and are referred to as Code Generators. A
code generator is a tool that enables automatic generation of code from the analysis and design
specifications. Generating code this way ensures that all code is produced with identical naming
conventions.
Code Generators: -Code generators produce a high quality of code that is easy to maintain and is
portable. They are able to interact with Upper CASE tools to aid in the development of code.
Object-Oriented CASE
CASE tools are well supported in object-oriented programming systems (OOPS)Earlier problems with
OOPS focused on models created for software development systems and their different notations. This
was overcome by the use of UML, Unified Modelling Language, which is a new standard for producing
diagrams and charts. All current CASE tools have now adopted UML for specifying, visualizing and
constructing software systems.
UML CASE tools offer automatic code generation from the UML diagram
This tool produces a framework for the code which contains objects and classes. An Executable
Prototype is produced. This is an executable source code program obtained directly from UML. One of
the main features in UML is Reverse Engineering where existing source code is reversed engineered
into a set of UML diagrams.