KRHS Internet Lesson

Teacher Name:Mr. Rung                          Date of Lesson: January

Course Name: C++                    Lesson Name: Chap 12.4ab

Student Name

Password


Objective
To complete the wokbook exercises.


Primary Focus
Answer the questions below.

Site Links
Course Home Page

Additional Resources

Site Links


Question #1

The type of relationship among objects known as containment is also referred to as an is-a rela- tionship.

True         False


Question #2

When a class inherits the properties of another class, the class from which the properties are in- herited is known as the parent class.

True         False


Question #3

Inheritance can be only single level.

True         False


Question #4

Users of a class do not need to know that the class is derived, as long as they know what mem- bers are available to them.

True         False


Question #5

An object created from a derived class can call a parent class's member function.

True         False


Question #6

Why is reusing a class often easier than reusing a function, especially when complex data types are involved?


Question #7

Is multiple inheritance the same thing as containment?

Why or why not?


Question #8

Suppose there is a class called Person. In its protected section, it has a variable named Age. Also, there is another class Student that is derived from the class Person. Does the class Student have direct access to the protected variable named Age ? .

Explain


Question #9

Suppose there is a class named Student-Group that contains several instances of the class Student described in the question above. Does the class Student-Group have direct access to the protected variable named Age in each of the instances of Student ?

Explain.


Question #10

State the is-a/has-a rule in your own words.