Computer Programming ICT-1205: Dr. Mohammad Abu Yousuf Yousuf@juniv - Edu
Computer Programming ICT-1205: Dr. Mohammad Abu Yousuf Yousuf@juniv - Edu
ICT-1205
Dr. Mohammad Abu Yousuf
[email protected]
1
Introduction
2
Introduction
3
Encapsulation
4
Encapsulation
5
Polymorphism
• Polymorphism means to process objects differently
based on their data type.
• In other words it means, one method with multiple
implementation, for a certain class of action. And which
implementation to be used is decided at runtime
depending upon the situation (i.e., data type of the
object).
9
Explanation of previous example
10
Explanation of previous example
14
Another Example
int main()
{ // prints "Hello,W orld!":
cout << "Hel" << "lo, Wo" << "rld!" << endl;
}
15
Explanation of previous example
16
Thank you
17