Reading_Notes

View the Project on GitHub Hiba-Almade/Reading_Notes

Inheritance and Interfaces

What Is an Object?

Objects in programming are like real things Each of them has different states and behaviors with its own characteristics and nature

>> Program objects provide a number of benefits:

What Is a Class?

A class is the blueprint from which individual objects are created. contain the defult decleare for any object

>> what is the states and action that object can dell with it.

What is inheritance?

A group of organisms may share some characteristics and differ in others So to make it easier to deal with and make it more flexible Common traits can be combined into one class from which the other classes inherit

>> The relationship between them is like father (superclass) and sons(subclass), a father can have more than one son, but every son has only one father

>> Subclass can declare new fields that are not in the superclass.

What is the interface?

The link between the outside world and the building of the class, its organization and the way it works. Like a group of buttons, we press one of them, and something happens without us knowing the details of its occurrence