Professional Documents
Culture Documents
Unit 1 Solution
Unit 1 Solution
Chapter 1
Review Questions
1.1: What do you think are the major issues facing the software industry today?
Ans: Many software products are either not finished or not used or not delivered for some major
errors. Today some of the quality issues that must be considered for software industry are:
1. Correctness.
2. Maintainability.
3. Reusability.
4. Openness and interoperability.
5. Portability.
6. Security.
7. Integrity.
8. User friendliness.
1.2: Briefly discuss the software evolution during the period 1950 1990.
Ans: In 1950, the first three modern programming languages whose descendants are still in
widespread today.
Ans: Conventional programming, using high level language such as COBOL, FORTAN and C is
commonly known as procedure oriented programming.
Characteristics :
a) Emphasis is on doing things (algorithms)
b) Large programs are divided into small programs known as function.
c) Most of the function share global data.
d) Data move openly around the system from function to function.
e) Function transform data from one form to another.
Ans: In a multi-function program, many important data items are placed as global so that they
may be accessed by all the functions. Each function may have its own local data.
Ans: Data and functions are belongs to a class. Data is called data member and functions are
called member functions. There is a visibility-mode such as public and private. Generally data is
private and functions are public.
Ans: The unique advantage of object-oriented program paradigm is to have a working definition
of OOP before we proceed further.
1.9: Distinguish between the following terms:
(a) Objects and classes
(b) Data abstraction and data encapsulation
(c) Inheritance and polymorphism
(d) Dynamic binding and message passing
Ans: (a) Objects are the basic run-time entities which contain data and code to manipulate data
where the entire set of data and code of an object can be made as a user-defined data type with the
help of a class. In short, objects are numbers of classes.
(b) Describing the functionality of a class independent of its implementation is called data
abstraction. Where data encapsulation means the wrapping up of data and functions into a single
unit.
(c) The mechanism of deriving a new class from an old one is called inheritance, where
polymorphism means one thing with several distinct terms.
(d) Binding refers to the linking of a procedure call to be executed in response to the call. When
binding occurs at run-time, then it is known as dynamic-binding.
Massage passing involves specifying the name of the object, the name of the function and the
information to be sent
Ans: Objects are the basic run-time entities in an object-oriented system. They may represent a
person, a place, a bank account, a table of data or any item that the program has to handle.
Ans: Inheritance is one of the most powerful feature of object-oriented programming. Inheritance
is the process of creating new class from existing class. The new class is called derived class and
existing class is called base class.
Ans: Binding refers to the linking of a procedure call to be executed in response to the call. When
binding occurs at run time it is known as dynamic binding. Dynamic binding is useful in OOP
such as a function call associated with a polymorphic reference depends on the dynamic type of
that reference.
1.13:Now does object-oriented approach differ from object-based approach?
Ans: Object-based programming do not support inheritance and dynamic binding but object-
oriented programming do so.
1.14:
Ans:
a> FALSE
b> TRUE
c> TRUE
d> FALSE
e> FALSE
f> TRUE
g> TRUE
h> FALSE
i> TRUE
j> FALSE