380 Object-Oriented Programming: Inheritance Chapter 9 inheritance override (Web site translator)
380 Object-Oriented Programming: Inheritance Chapter 9 inheritance override keyword inheritance hierarchy overriding inherited instance variable overriding a base-class method instance variable (of an object) overriding a method internalmember access modifier private base-class member is-a relationship protected access member-access operator protected base-class member member variable (of a class) protected variable multiple inheritance protected member of a base class base reference protected member of a derived class Object class public member of a derived class object of a base class reusable component object of a derived class single inheritance object-oriented programming (OOP) software reusability overloaded constructor software reuse overloading virtual keyword SELF-REVIEW EXERCISES 9.1 Fill in the blanks in each of the following statements: a) is a form of software reusability in which new classes absorb the data and behaviors of existing classes and embellish these classes with new capabilities. b) A base class s members can be accessed only in the base-class definition or in derived-class definitions. c) In a(n) relationship, an object of a derived class also can be treated as an object of its base class. d) In a(n) relationship, a class object has one or more references to objects of other classes as members. e) A class exists in a(n) relationship with its derived classes. f) A base class s members are accessible anywhere that the program has a ref erence to that base class or to one of its derived classes. g) A base class s protected access members have a level of protection between those of publicand access. h) A base class s members can be accessed only in the same assembly. i) When an object of a derived class is instantiated, the base class s is called implicitly or explicitly to do any necessary initialization of the base-class instance variables in the derived-class object. j) Derived-class constructors can call base-class constructors via the reference. 9.2 State whether each of the following is true or false. If false, explain why. a) It is possible to treat base-class objects and derived-class objects similarly. b) Base-class constructors are not inherited by derived classes. c) A has-a relationship is implemented via inheritance. d) All methods, by default, can be overridden. e) Method ToString of class System.Object is declared as virtual. f) When a derived class redefines a base-class method using the same signature, the derived class is said to overload that base-class method. g) A Car class has an is a relationship with its SteeringWheeland Brakes. h) Inheritance encourages the reuse of proven high-quality software.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.