Questions
Question 1 Multiple Choice (Single Answer)
Inheritance makes it easier to:
- reuse and modify existing modules of code.
- write and read code by sharing method names.
- hide and protect data from external code.
- Both a and b.
- All of the above.
Question 2 Multiple Choice (Single Answer)
Polymorphism makes it easier to:
- reuse and modify existing modules of code.
- write and read code by sharing method names.
- hide and protect data from external code.
- Both a and b.
- All of the above.
Question 3 Multiple Choice (Single Answer)
The standard prefix to signify a class is:
- B
- C
- L
- S
- T
Question 4 Multiple Choice (Single Answer)
When using encapsulation how should data be shared with external code?
- Events
- Methods
- Properties
- Private variables
- Public variables
Question 5 Multiple Choice (Single Answer)
Which statement is true?
- A base class inherits some of the properties of a derived class.
- A base class inherits all of the properties of a derived class.
- A derived class inherits some of the properties of a base class.
- A derived class inherits all of the properties of a base class.
- None of the above.
Question 6 Multiple Choice (Single Answer)
When a base class is changed:
- there is no effect on the derived class.
- the derived class changes when the key word Overridden is used.
- only the methods of the derived class change.
- only the properties of the derived class change.
- the derived class automatically changes.
Question 7 Multiple Choice (Single Answer)
Polymorphism can apply to:
- math operators.
- method names.
- object names.
- Both a and b.
- All of the above.
Question 8 Multiple Choice (Single Answer)
With polymorphism:
- one method can have multiple names.
- one object can have multiple names.
- many methods can share the same name.
- many objects can share the same name.
- None of the above statements are true.
Question 9 Multiple Choice (Single Answer)
Which element of a class is optional?
- Constructs
- Fields
- Methods
- Properties
- All of the above.
Question 10 Multiple Choice (Single Answer)
What is the suggested order for the definition of class elements from first to last?
- Constructs, fields, methods, properties
- Properties, constructs, fields, methods
- Fields, properties, constructs, methods
- Constructs, properties, fields, methods
- Methods, constructs, properties, fields
Question 11 Multiple Choice (Single Answer)
A constructor is a special type of:
- class.
- field.
- method.
- property.
- variable.
Question 12 Multiple Choice (Single Answer)
Which is true for constructors in a class?
- All constructors must have the same number of parameters.
- All constructors must be the same parameter data type.
- Some constructors can have the same list of parameters.
- Only two constructors in a class can have the same list of parameters.
- No two constructors in a class can have the same list of parameters.
Question 13 Multiple Choice (Single Answer)
Which statement will call a constructor of a base class?
- Base.New( )
- BaseConstructor.New ( )
- CallBase.New( )
- Constructor.New ( )
- MyBase.New( )