1. Which of the following wud be a good example of a parent class to Elephant?
a. Mammals
b. ZooAnimals
c. Africa
d. myFavorite
2. according to C# convention, which of the following is a proper exception error message?
a. Division by zero
b. The bank balance is negative
c. Negative balance
d. The progam attempted to divide by zero
3. Which of the following is not a benefit of using inheritance?
a. Inheritance makes writing programs easier
b. Inheritance makes program easier to understand
c. Inheritance makes methods %26amp; data available to exisiting classes
d. Inheritance makes methods %26amp; data of subclasses available to superclass
4. A subclass constructor initiates data fields
a. Specific to subclass
b. That superclass %26amp; subclass share
c. Specific to subclass
d In all of subclasses within superclass
5. When programming in C#, methods are typically
a. Private
b. Public
c. Protected
d. hidden
Choose the best choice?
1a , Mammal and not Africa since Elephants are found in Asia as well
2a : Divide by zero
3 :d
4a : Actually this question should say 'initializes' and not 'initiates'
5a : If no other access level is specified they by default take private access , Please do clarify 5 in detail, through a good C# book because these are basics and you must be clear if you are hoping to program in C# or any other programming language for that matter.
Reply:1.c
2.d
3.d
4.d
5.b
survey monkey
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment