Ambiguity in Inheritance
Ambiguity in Inheritance
INHERITANCE
-by Aditya kumar Vishwakarma
-JK702
INHERITANCE
► Sub Class: The class that inherits properties from another class is called Sub
class or Derived Class.
► Super Class:The class whose properties are inherited by sub class is called
Base Class or Super class.
TYPES OF INHERITANCE
ClassD obj;
//obj.a = 10; //Statement 1, Error occur
//obj.a = 100; //Statement 2, Error occur
obj.ClassB::a = 10; //Statement 3
obj.ClassC::a = 100; //Statement 4
obj.b = 20;
obj.c = 30;
obj.d = 40;
}
REAL TIME EXAMPLE
I went out in the woods and found a bat.Was it
a little furry winged creature? Or a baseball
bat? Because the word “bat” is polysemous, it
provides us with a very simple example of
semantic ambiguity.
how to resolve ambiguity.