Wednesday 5 December 2012

CS304 Quiz 2 Solved by Usama



On Wed, Dec 5, 2012 at 9:06 PM, Muhammad Usama <m.usama905@gmail.com> wrote:

Method "getInterestRate()" should belongs to class
Account()
SavingAccount()
CurrentAccount()
None of the given options

Can we access methods of composed object in the same way as we can access methods of other objects?
Yes
No

What will be most appropriate C++ data type for variable "InterestRate
Int
long int
double
float

Select correct line of code for composition relationship between "Keyboard" class and "Keys" class

class keyboard { Keys type;};
class keys{ KeyBoard type; };
class keyboard : private keys
class keys: private KeyBoard

The direction specifies which object contains the other object. In aggregation direction is must
Yes
No



In _______________ a pointer or reference to an object is created inside a class
Select correct option:
Aggregation
Composition
Seperation
None of the given

_____ is creating objects of one class inside another class.

Association

Composition

Aggregation

Inheritance

 What will be most appropriate C++ data type for variable "InterestRate

Int
long int
double
float

Select correct line of code for composition relationship between "Keyboard" class and "Keys" class
class keyboard { Keys type;};
class keys{ KeyBoard type; };
class keyboard : private keys
class keys: private KeyBoard


In _______________ a pointer or reference to an object is created inside a class

Select correct option:

Aggregation

Composition

Seperation

None of the given 



Muhammad Usama's profile photo
--
-- 
For University of Pakistan Study Material Sharing, Discussion, etc, Come and join us at http://4e542a34.linkbucks.com
You received this message because you are subscribed to the Google
Groups "Study" group.
To post to this group, send email to http://ca13054d.tinylinks.co
For more options, visit this group at
http://004bbb67.any.gs


No comments:

Post a Comment

Note: only a member of this blog may post a comment.