Main

Monday, 26 November 2012

cs304 quiz # 2 (26-11-2012)


BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 1 of 10 ( Start time: 09:56:00 PM )     Total Marks: 1
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; };

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 2 of 10 ( Start time: 09:56:50 PM )     Total Marks: 1
What type of relationship exists between “Account” class and “CurrentAccount” class?
Select correct option:
    Inheritance
    Composition
    Aggregation
    Association

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 3 of 10 ( Start time: 09:58:21 PM )     Total Marks: 1
“Person” class is composed off “Nationality” class. What will be the order of execution of destructor of “Keyboard” class and “Keys” class?
Select correct option:
    First Destructor:: Nationality.. Second Destructor:: Person..
    First Destructor:: Person.. Second Destructor:: Nationality..

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 4 of 10 ( Start time: 09:59:49 PM )     Total Marks: 1
Select correct line of code for inheritance relationship between “Person” class and “Supervisor” class. “Person” is parent class while “Supervisor” is child class.
Select correct option:
    class Supervisor: public Person
    class Person: public Supervisor
    class Supervisor:: public Person
    class Person:: public Supervisor

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 5 of 10 ( Start time: 10:00:08 PM )     Total Marks: 1
Can we access methods of composed object in the same way as we can access methods of other objects?
Select correct option:
    Yes
    No

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 6 of 10 ( Start time: 10:00:22 PM )     Total Marks: 1
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

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 7 of 10 ( Start time: 10:01:41 PM )     Total Marks: 1
What will be most appropriate C++ data type for variable “InterestRate”?
Select correct option:
    int
    long int
    double
    float

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     90
sec(s)    
Question # 8 of 10 ( Start time: 10:02:00 PM )     Total Marks: 1
“Account” is parent class while “CurrentAccount” is child class. Can I inherit the constructor of “account” class?
Select correct option:
    Yes
    No

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 9 of 10 ( Start time: 10:02:52 PM )     Total Marks: 1
Select correct line of code for inheritance relationship between “Gender” class and “Female” class. “Gender” is parent class while “Female” is child class.
Select correct option:
    class Female: public Gender
    class Gender: public Female
    class Female:: public Gender
    class Gender:: public Female

BC090201078 : Waqas



Quiz Start Time: 09:55 PM    
Time Left     89
sec(s)    
Question # 10 of 10 ( Start time: 10:04:04 PM )     Total Marks: 1
In______________, a pointer or reference to an object is created inside a class.
Select correct option:
    Aggregation
    Composition
    Inheritance
    Association

1 comment:

Ahmer Ilyas said...

cs304 solved quizzes/mcq's
http://vukwl.blogspot.com/search/label/CS304

Post a Comment