How To Exam?

a knowledge trading engine...


DOEACC Society 2007 DOEACC A Level A10.1-R3 Introduction to Object Oriented Programming

Thursday, 13 June 2013 08:10Web
1.9 We can make a class abstract by
A) Declaring it abstract using the static keyword
B) Declaring it abstract using the virtual keyword
C) Making all member functions constant
D) Making at lowest 1 member function as pure virtual function
1.10An exception is caused by
A) A hardware issue
B) A issue in the operating system
C) A run-time fault
D) A syntax fault
A10.1-R3 Page three of five January, 2007
2. every statement beneath is either actual or FALSE. select the most improper one
and ENTER in the “tear-off” sheet attached to the ques. paper, subsequent
instructions therein. (1 x 10)
2.1 A ‘Do’ loop is executed at lowest once.
2.2 Objects of the string class can be copied with the assignment operator.
2.3 Inheritance is used to improve data hiding and encapsulation.
2.4 An abstract class is never used as a base class.
2.5 A file pointer always contains the address of the file.
2.6 Template creates various versions of a function at run time.
2.7 Throwing an exception always causes program termination.
2.8 Derived classes of an abstract class that do not give an implementation of a pure
virtual function are also abstract.
2.9 A function template can have more than 1 template argument.
2.10 The function that has return kind void does not return anything.
3. Match words and phrases in column X with the nearest related meaning/
word(s)/phrase(s) in column Y. Enter your selection in the “tear-off” ans sheet
attached to the ques. paper, subsequent instructions therein. (1 x 10)
X Y
3.1 Reusability A. Can appear in the class desiring access to a different class
3.2 Abstract data
type
B. is a well-defined and complete data abstraction that uses the
principle of info hiding.
3.3 Function C. Is used to delete the memory allocated by new.
3.4 Token D. Makes a program run faster
3.5 Encapsulation E. It means 1 name having multiple forms.
3.6 Friend F. A class can contain objects of other classes
3.7 Static_ cast G. It may be over loaded.
3.8 Delete H. This operator is used for any standard conversion of data kind.
3.9 Local variable I. It is the smallest individual units in a program
3.10 Polymorphism J. The wrapping up of data and functions into a single unit
K. Is a variable described within a statement block
L. Is given by the concept of Inheritance
A10.1-R3 Page four of five January, 2007
4. every statement beneath has a blank space to fit 1 of the word(s) or phrase(s) in
the list beneath. Enter your option in the “tear-off” ans sheet attached to the
ques. paper, subsequent instructions therein. (1 x 10)
A. class name B. object C. new
D. brackets E. comment F. zero
G. iostream H. inheritance I. multilevel
J. static K. public L. virtual
M. protected N. istream O. catch
4.1 ___________ is used to document a program.
4.2 A constructor’s name is identical as _______________.
4.3 A(n) ________ function causes its class to be abstract.
4.4 A pointer to _________ can hold pointers to any data kind.
4.5 _________ are used to change the order of precedence in valuation of expression.
4.6 The process by which objects of 1 class acquire the attributes of objects of a different
class is known as __________.
4.7 The class _____________ declares input function such as get( ) and read( ).
4.8 The___________ operator dynamically allocates memory for the object of a specific
type.
4.9 A virtual function can be made pure virtual function by placing__________ at the end of
its prototype in the class definition.
4.10 Exceptions are thrown from a try statement to a(n) __________ block.
A10.1-R3 Page five of five January, 2007
PART TWO
(Answer any 4 questions)
5.
a) Differentiate ranging from declaration and definition in C++.
b) discuss the concept of exception handling.
c) Write a class employee with 2 function get data and put data to learn the name and
number of employee and display them respectively. Drive 2 classes 1 manager and
other scientist. In manager class add 1 more variable title. In scientist class add more
variable publication and display them.
(2+3+10)
6.
a) How can a '::' operator be used as unary operator?
b) elaborate the merits and demerits of friend function?
c) Why does the function arguments are called as "signatures"? provide example.
d) How do structures in ‘C’ and ‘C++’ differ? How does a ‘C++’ structure differ from a class?
(3+4+4+4)
7.
a) Differentiate ranging from early binding and late binding.
b) Write ‘C++’ class for the following:
To represent two-dimensional point (x, y), class should contain all various constructors
and methods to print point (x, y) format and also to add 2 points by adding their x and
y values.
c) Write a ‘C++’ program for scalar multiplication where every item in array of N values is
multiplied by a provided constant. Write necessary class and test it using main( ).
(5+5+5)
8.
a) Write a program to concatenate 2 strings using operator overloading.
b) Write a function using reference variable as arguments to swap the values of a pair of
integers.
c) Write short note on: static variables and static functions.
(5+5+5)
9.
a) What is a class template? List the merits and demerits of using a template in ‘C++’.
b) When is it necessary to use member-wise initialization list (also known as header
initialization list) in ‘C++’?
c) discuss stream classes, stream class hierarchy and stream manipulators.
d) Justify the use of constructors and destructors in C++.
(4+4+3+4)
A10.1-R3 Page six of five January, 2007




( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER DOEACC Society 2007 DOEACC A Level A10.1-R3 Introduction to Object Oriented Programming