Oose Imp Que
Oose Imp Que
1.Define the object “Book” with possible attributes & operations with visibility.
Ans: If we derive a subclass from a Protected base class. Then both public member and
protected members of the base class will become protected in the derived class.
Ans: A Fork notation in a UML Activity Diagram is a control node that splits a flow into
multiple concurrent flows. This will have one incoming edge and multiple outgoing edges. A
join node is a control node that synchronizes multiple flows. This will have multiple incoming
edges and one outgoing edge.
Ans: Alpha Testing is a type of software testing performed to identify bugs before
releasing the product to real users or to the public.
11.Define the object “Passenger” with possible attributes & operations with visibility.
Ans: UML is composed of three main building blocks, i.e., things, relationships, and
diagrams.
Ans:
Ans: A role name is a name that uniquely identifies one end of an association.
Ans: A swimlane diagram is a type of flowchart that delineates who does what in a process.
17.Define actor.
Ans: specifies a role played by a user or any other system that interacts with the subject."
Ans: use component diagrams to model software systems at a high level or to show
components at a lower, package level.
Ans: The role gives a description of the association between Professor and Book. In this
case Professor is the writer of the associated book. Each object needs to hold a reference to
the associated object or objects
Ans: The term leaf refers to the organ that forms the main lateral appendage on the stem of
vascular plants.
Ans: Components usually come in two types, functional components and class components
Ans: Stubs and drivers are used to test modules. Stubs are used to test the functionality of
modules, whereas drivers are used when the main module is not ready.
24.Define collaboration.
Ans: a collaboration is a type of structured classifier in which roles and attributes co-operate
to define the internal structure of a classifier.
Ans: A recursive association connects a single class type (serving in one role) to itself
(serving in another role). Example: In most companies, each employee (except the CEO) is
supervised by one manager.
Ans: A link attribute simply assigns a value to a particular instance of the link, that is, for
each pair of objects that are associated there is a particular value of the attribute.
Ans: Object interaction modeling overview. Object Interaction Modeling demonstrates the
dynamic behavior that occurs between objects by integrating the static Class Model with use
cases.
Ans: an interaction diagram is a type of UML diagram that's used to capture the interactive
behavior of a system
Ans: Beta testing is one of the final steps in your software development lifecycle (SDLC)
before a product goes live
32.Define the object “Employee” with possible attributes & operations with visibility.
ANS:
33.“You can’t create multiple instances of a given class”. State true/ false & justify.
ANS: false:we can create multiple instances of given class as Each object will hold its own individual
inner variables
ANS: The purpose of use case diagram is to capture the dynamic aspect of a system. Use
case diagrams are used to gather the requirements of a system including internal and
external influences. These requirements are mostly design requirements. Hence, when a
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified.
Ans :An Active Class indicates that, when instantiated, the Class controls its own
execution. Rather than being invoked or activated by other objects, it can operate
standalone and define its own thread of behavior.
ANS: Object Oriented Analysis (OOA) is process of discovery where a development team
understands and models the requirements of the system. In OOA requirements are organized as
objects. It integrates all the process and data. But in others or traditional structural analysis both
process and data are considered independently/separately. They use flow chart/structure charts for
process and ER diagrams for data.
But In OOA some advance models are used. The common models used in OOA are: Use cases, Object
models
39.What are the four(4) kinds of things used in UML? Explain Structural things in detail.
ANS: the four kinds of things are:1)structural things 2)behavioural things 3)grouping things
4)annotational things
Structural things: A structural thing is used to describe the static part of a model. It is used to
represent the things that are visible to human eyes. Structural things in UML are all about the physical
part of a system. It is the noun of a UML model, such as a class, object, interface, collaboration, use
case, component, and a node
Interface − Interface defines a set of operations, which specify the responsibility of a class.
Use case −Use case represents a set of actions performed by a system for a specific goal.
Node − A node can be defined as a physical element that exists at run time.
ANS: Relationships in UML are used to represent a connection between structural, behavioral, or
grouping things. It is also called a link that describes how two or more things can relate to each other
during the execution of a system. Type of UML Relationship are Association, Dependency ,
Generalization , and Realization
Association: It is a set of links that connects elements of the UML model. It also defines how many
objects are taking part in that relation.
Dependency: In a dependency relationship, as the name suggests, two or more elements are
dependent on each other. In this kind of a relationship, if we make a change to a particular element,
then it is likely possible that all the other elements will also get affected by the change.
Realization :In a realization relationship of UML, one entity denotes some responsibility which is not
implemented by itself and the other entity that implements them. This relationship is mostly found in
the case of interfaces.
41.Prepare a class diagram for “Hospital Management System”, consisting of at least three
classes. Define appropriate attributes with visibility, relationships, association with multiplicity.
Eg:
43.Prepare a class diagram for “E- shopping System”, consisting of at least three classes. Define
appropriate attributes with visibility, relationships, association with multiplicity.
44.Draw state transition diagram for queue, showing all possible states.
ANS:Class Diagram gives the static view of an application. A class diagram describes the types of
objects in the system and the different types of relationships that exist among them. This modeling
method can run with almost all Object-Oriented Methods. A class can refer to another class. A class
can have its objects or may inherit from other classes
purpose:1. Describing the static view of the system. 2.Showing the collaboration among the
elements of the static view.3.Describing the functionalities performed by the system.4.
Construction of software applications using object oriented languages.
Types:
1 Big Bang Testing: Big Bang Testing is an Integration testing approach in which all the
components or modules are integrated together at once and then tested as a unit. This
combined set of components is considered as an entity while testing. If all of the components
in the unit are not completed, the integration process will not execute.
ANS:Object is an instance of a class in a particular moment in runtime that can have its own state
and data values. Likewise a static UML object diagram is an instance of a class diagram; it shows a
snapshot of the detailed state of a system at a point in time, thus an object diagram encompasses
objects and their relationships which may be considered a special case of a class diagram or a
communication diagram.
Purpose of Object Diagram: 1.The use of object diagrams is fairly limited, mainly to show examples
of data structures. 2.During the analysis phase of a project, you might create a class diagram to
describe the structure of a system and then create a set of object diagrams as test cases to verify the
accuracy and completeness of the class diagram. 3.Before you create a class diagram, you might
create an object diagram to discover facts about specific model elements and their links, or to
illustrate specific examples of the classifiers that are required. 4.An object diagram shows this
relation between the instantiated classes and the defined class, and the relation between these
objects in the system. They are be useful to explain smaller portions of your system, when your
system class diagram is very complex, and also sometimes modeling recursive relationship in
diagram. 5.The best way to illustrate what an object diagram look like is to show the object diagram
derived from the corresponding class diagram.
ANS: Inheritance is one in which a new class is created that inherits the properties of the
already exist class. It supports the concept of code reusability and reduces the length of the
code in object-oriented programming.
Polymorphism is that in which we can perform a task in multiple forms or ways. It is applied
to the functions or methods. Polymorphism allows the object to decide which form of the
function to implement at compile-time as well as run-time.
49.What are the four (4) kinds of things used in UML? Explain Behavioral things in
detail. (refer q39)
Behavioural things:
ANS: A recursive aggregate has directly or indirectly an instance of the same kind of
aggregate. Propagation or triggering is a good indicator of aggregation. The trigger leads to
the application of a network of operations. When moving an aggregate al of its parts moves.
Example − The following figures show examples of different relationships between classes. The first
figure shows an association between two classes, Department and Employee, wherein a department
may have a number of employees working in it. Worker is the role name. The ‘1’ alongside
Department and ‘*’ alongside Employee depict that the cardinality ratio is one–to–many. The second
figure portrays the aggregation relationship, a University is the “whole–of” many Departments.
52.Prepare a class diagram for “Medical Shop Management System”, consisting of at least three
classes. Define appropriate attributes with visibility, relationships, association with multiplicity.
ANS:
53.A customer swap his/her card in ATM. If pin is valid, amount & transaction type is valid, money
is issued &updates are done in account. If not, transaction is rejected. Draw an activity diagram
for above situation. ANS:
ANS: Inheritance is the mechanism that permits new classes to be created out of existing classes by
extending and refining its capabilities. The existing classes are called the base classes/parent
classes/super-classes, and the new classes are called the derived classes/child classes/subclasses.
The subclass can inherit or derive the attributes and methods of the super-class(es) provided that the
super-class allows so. Besides, the subclass may add its own attributes and methods and may modify
any of the super-class methods. Inheritance defines an “is – a” relationship.
Example: From a class Mammal, a number of classes can be derived such as Human, Cat, Dog, Cow,
etc. Humans, cats, dogs, and cows all have the distinct characteristics of mammals. In addition, each
has its own particular characteristics. It can be said that a cow “is – a” mammal.
Types of Inheritance
Single Inheritance − A subclass derives from a single super-class.
Multiple Inheritance − A subclass derives from more than one super-classes.
Multilevel Inheritance − A subclass derives from a super-class which in turn is derived from another
class and so on.
Hierarchical Inheritance − A class has a number of subclasses each of which may have subsequent
subclasses, continuing for a number of levels, so as to form a tree structure.
Hybrid Inheritance − A combination of multiple and multilevel inheritance so as to form a lattice
structure.
ANS: In some situations we may want to limit the visibility (access) of an object to the objects
outside the association relationship.
we can use the visibility specifiers:
public (+), private (-) and protected (#)
E.g. A ‘UserGroup’ object can access the ‘User’ object and an ‘User’ object can access the ‘Password’.
If, private visibility is specified for the password object, the ‘UserGroup’ object cannot access the
‘Password’ of the ‘User object’.
ANS: Object-oriented analysis and design (OOAD) is a technical approach for analyzing and
designing an application, system, or business by applying object-oriented programming, as
well as using visual modeling throughout the software development process to guide
stakeholder communication and product quality. It is based in a set of basic principles,
which are as follows- 1.The information domain is modeled. 2.Behavior is
represented.3.Function is described. 4.Data, functional, and behavioral models are divided
to uncover greater detail. 5.Early models represent the essence of the problem, while later
ones provide implementation
details.
57.Consider an Automatic water level control system, which is used for controlling the water flow.
Identify the different states & draw a state chart diagram.
58.Consider a “Fixed deposit system”, which allows customer to perform various transactions.
Discuss different scenarios & draw a sequence diagram.
59.Draw component diagram for online shopping system.
ANS:
61.Explain White box testing with any two methods used in it.
ANS: White box testing is a software evaluating method used to examine the internal
structure, design, coding and inner-working of software. Developers use this testing method
to verify the flow of inputs and outputs through the application, improving usability and
design and strengthening security. METHODS:1)Unit testing. The individual units or
components of the application’s source code are tested. It aims to validate whether
each unit of the application can behave as desired. This type of white box software
testing is essential for identifying anomalies early in the development life cycle. Defects
discovered during unit testing are easier and cheaper to fix. 2)Integration testing. This
type of white box testing involves combining individual units or components of the
application’s source code and testing them as a group. The purpose is to expose errors
in the interactions of the different interfaces with one another. It takes place after unit
testing
62.What are the four (4) kinds of things used in UML? Explain Grouping things& Annotational
things in detail.
ANS: Things are the most important building blocks of UML. Things can be −
Structural (nouns/static of UML models )
Behavioral (verbs/dynamic parts of UML models)
Grouping (organizational parts of UML models)
Annotational (explanatory parts of UML models)
63.Explain different types of views in UML with their respective diagrams.
ANS: The User View
Use Case Diagram. The user view provides a window into the system from the user's perspective, in
that the functionality of the system is modeled in terms of the user and what the user expects of the
system. In UML-ese, the user of the system is called an actor, which can represent either a human user
or users as other systems. The functionality of the system is defined by the use cases. The lines
connecting the actors and the use cases show that the actors interact with the functionality provided by
the use case. Use cases are usually described in greater detail in Functional Requirements.
Business Use Case Diagram. The business use case diagram is an extension to the use case diagram
and is defined in and supported by UML. The first step in business modeling using the UML is
identifying the interactions between the business processes and those entities outside the business,
such as customers and suppliers
The Structural View
Class Diagram. Class diagrams describe the static structure of a system. The focus of the class
diagram is to describe how a system is structured rather than how it behaves. Class diagrams are
probably the most versatile of the UML diagrams. Data models, software components, software
classes, and business objects are modeled using the class diagram, each in its own diagram.
The Behavior View
The Sequence Diagram. Sequence diagrams describe the behavior of a use case by diagramming the
classes and the messages exchanged between them, arranged in chronological order. Sequence
diagrams do not describe object relationships; that view of the system is reserved for collaboration
diagrams. Object and actor instances can be displayed in the sequence diagram along with how the
objects communicate by sending messages to one another.
Collaboration Diagram. The collaboration diagram is a view of the interactions of objects and unlike
the sequence diagram that describes the objects, messaging over time, collaboration diagrams display
the relationships between objects. Some UML tools can automatically generate collaboration
diagrams from sequence diagrams, and vice versa. Collaboration and sequence diagrams express
similar information but they display it from different perspectives.
Activity Diagram. The activity diagram is a specialization of the state diagram and it displays the
dynamics of a system by showing the workflow. The activity diagram complements the business use
case diagram in that it shows the process flow behind the use case.
State Diagram. The state diagram describes the sequence of states that an object goes through during
its lifetime. The state diagram displays the events that act upon the object that enables the transition
from one state to the next
The Implementation View
Component Diagram. The component diagram displays the static structure of the implementation
view. The component diagram shows the organizations and dependencies of the components,
subsystems, and their relationships. The diagram models the interface that can be used to show the
externally visible operations of a class or component.
Deployment Diagram. The deployment diagram shows the configuration of run-time processing
elements and the software components, processes and objects that execute on them. The deployment
diagram can be used for business modeling where employees and organizations are displayed as run-
time processing elements and the procedures and documents that they use are displayed as the
software components
64.Give any 5 advantages of using UML.
ANS: Provides standard for software development.
- Reducing of costs to develop diagrams of UML using supporting tools.
- Development time is reduced.
- The past faced issues by the developers are no longer exists.
- Has large visual elements to construct and easy to follow.
65.Explain Black box testing with any two methods used in it.
ANS: Black box testing is used to test the system against external factors responsible for
software failures. This testing approach focuses on the input that goes into the software, and
the output that is produced. The testing team does not cover the inside details such as code,
server logic, and development method.
Boundary Boundary Value Technique is used to test boundary values, boundary values
Value are those that contain the upper and lower limit of a variable. It tests, while
Technique entering boundary value whether the software is producing correct output or
not.
State State Transition Technique is used to capture the behavior of the software
Transition application when different input values are given to the same function. This
Technique applies to those types of applications that provide the specific number of
attempts to access the application.
Messages
Messages are arrows that represent communication between objects. Use half-arrowed lines
to represent asynchronous messages. Asynchronous messages are sent from an object that
will not wait for a response from the receiver before continuing its tasks. For message types,
see below.
Lifelines
Lifelines are vertical dashed lines that indicate the object's presence over time.
Destroying Objects
Objects can be terminated early using an arrow labeled "<< destroy >>" that points to an X.
This object is removed from memory. When that object's lifeline ends, you can place an X at
the end of its lifeline to denote a destruction occurrence.
Loops
A repetition or loop within a sequence diagram is depicted as a rectangle. Place the
condition for exiting the loop at the bottom left corner in square brackets [ ].
Types of Messages in Sequence Diagrams
Synchronous Message
A synchronous message requires a response before the interaction can continue. It's usually
drawn using a line with a solid arrowhead pointing from one object to anotheR
Asynchronous Message
Asynchronous messages don't need a reply for interaction to continue. Like synchronous
messages, they are drawn with an arrow connecting two lifelines; however, the arrowhead is
usually open and there's no return message depicted.
Self Message
A message an object sends to itself, usually shown as a U shaped arrow pointing back to
itself.
Create Message
This is a message that creates a new object. Similar to a return message, it's depicted with a
dashed line and an open arrowhead that points to the rectangle representing the object
created.
Delete Message
This is a message that destroys an object. It can be shown by an arrow with an x at the end.
Found Message
A message sent from an unknown recipient, shown by an arrow from an endpoint to a
lifeline.
Lost Message
A message sent to an unknown recipient. It's shown by an arrow going from a lifeline to an
endpoint, a filled circle or an x.
67.Discuss components of collaboration diagram & draw a collaboration diagram for “Student
admission system “
3.Messages: An arrow that commencing from one object to the destination object.
ANS:
69.What are the components of deployment diagram? Explain common uses of deployment
diagram.
ANS: 1)Artifact: A product developed by the software, symbolized by a rectangle with the
name and the word “artifact” enclosed by double arrows. 2)Association: A line that indicates
a message or other type of communication between nodes. 3)Component: A rectangle with
two tabs that indicates a software element. 4)Dependency: A dashed line that ends in an
arrow, which indicates that one node or component is dependent on another.
5)Interface: A circle that indicates a contractual relationship. Those objects that realize the
interface must complete some sort of obligation. 6)Node: A hardware or software object,
shown by a three-dimensional box. 7)Node as container: A node that contains another
node inside of it—such as in the example below, where the nodes contain components.
8)Stereotype: A device contained within the node, presented at the top of the node, with
the name bracketed by double arrows.
USES: 1)Deployment diagrams are used to visualize the topology of the physical components of a
system, where the software components are deployed.
2)Deployment diagrams are used to describe the static deployment view of a system. Deployment
diagrams consist of nodes and their relationships.
ANS: 1)Action: A step in the activity wherein the users or software perform a given task.
actions are symbolized with round-edged rectangles.2)Decision node: A conditional branch
in the flow that is represented by a diamond. It includes a single input and two or more
outputs .3)Control flows: Another name for the connectors that show the flow between
steps in the diagram. 4)Start node: Symbolizes the beginning of the activity. The start node
is represented by a black circle. 5)End node: Represents the final step in the activity. The end
node is represented by an outlined black circle.