Object Oriented

To be considered a true object oriented programming language the language must support the following:

Inheritance - Extends the functionality but can't remove it. The ability to derive new classes from existing classes. Allows you to treat objects of a derived type as objects of its base type. This can be used to create specialization.

Polymorphism - Creating routines that can operate an objects of different types that is handled with late binding and multiple interfaces. Allows you to manipulate objects of related types as though they were of a common type.

Encapsulation - Being able to hide parts of the implentation from being seen from the outside. You can use the "private" keyword to prevent variables from being seen from outside the class. The separation between interface and implementation. You can encapsulate the object and it is only made available to the outside through a well defined interface.

Abstraction - This focuses on the interface and gives you the ability to create an abstract representation of an object or concept and therefore being able to hide the complexity and logic. You can use the "private" keyword to prevent methods from being seen from outside the class.

Object Relationships

There are four different ways to think about the relationships between objects.

(is-a relationship)
One object is type of another object
Transfer parent to child

(part-of relationship)
strong relationship
two objects depend on each other

Relationship between independent or loosely coupled objects.
very weak relationship
two objects are independent

(parent-child relationship)
One object is made up of other objects
This is a special type of one-way association

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext