Question # 1 of 10 ( Start time:
01 :59 :09 PM )
What will be most appropriate C + + data
type for variable “ InterestRate ”?
Select correct option :
int
long int
double
=> float
Question # 2 of 10 ( Start time:
01 :59 :59 PM )
Select correct line of code for
aggregation relationship between
“ Person ” class and “ Address” class .
Select correct option :
=> class Person { Address * a ; };
class Address { Person * a ; };
class Person { Address a ; };
class Address { Person a ; };
Question # 3 of 10 ( Start time:
02 :01 :24 PM )
__________is creating objects of one
class inside another class.
Select correct option :
Aggregation
=> Composition
Inheritance
Association
Question # 4 of 10 ( Start time:
02 :02 :03 PM )
What type of relationship exists
between “ SavingAccount ” class and
“ CurrentAccount ” class?
Select correct option :
Both are child classes
Both contains each other
=? Both are composed of each other
None of the given option
Question # 5 of 10 ( Start time:
02 :03 :28 PM )
In ______________ destructor of sub-
object is called after destructor of
master class.
Select correct option :
Aggregation
=> Composition
Inheritance
Association
Question # 6 of 10 ( Start time:
02 :04 :53 PM )
Select correct line of code for
inheritance relationship between “ Keys ”
class and “ StandardKeys” class . “ Keys ”
is parent class while “ StandardKeys” is
child class.
Select correct option :
=> class StandardKeys : public Keys
class Keys : public StandardKeys
class StandardKeys :: public Keys
class Keys :: public StandardKeys
Question # 7 of 10 ( Start time:
02 :06 :07 PM )
Select correct line of code for
aggregation relationship between
“ Person ” class and “ Phone” class.
Select correct option :
=> class Person { Phone * p ; };
class Phone { Person * p ; };
class Person { Phone p ; };
class Phone { Person p ; };
Question # 8 of 10 ( Start time:
02 :07 :09 PM )
“ Keyboard ” class is composed off
“ keys ” class. What will be the order of
execution of destructor of “ Keyboard ”
class and “ Keys” class ?
Select correct option :
First Detructor: :Keys .. Second
Destructor : :Keyboard . .
=> First Destructor : : Keyboard ..
Second Destructor :: Keys. .
Question # 9 of 10 ( Start time:
02 :08 :38 PM )
There is an object of type Person ,
which of the following can be
considered as one of its attributes :
Select correct option :
Name
Workat ()
Age
=> Both age and name
Question # 10 of 10 ( Start time :
02 :09 :27 PM )
Select correct line of code for
composition relationship between
“ Keyboard ” class and “ Keys ” class.
Select correct option :
=> class keyboard { Keys type ;};
class keys { KeyBoard type ; };
class keyboard : private keys
class keys : private KeyBoard