Anda di halaman 1dari 2

Object-Oriented Programming Concepts

What Is an Object? An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example the hand can !rip somethin! or a Student "object# can !ive the name or address. $n pure OOP terms an object is an instance of a class.

What Is a Class?

A class is simply a representation of a type of object. $t is the blueprint% plan% template that describe the details of an object. A class is the blueprint from which the individual objects are created. Class is composed of three thin!s& a name attributes and operations.

What Is Encapsulation? 'ncapsulation is the inclusion within a pro!ram object of all the object to function - basically the methods and the data. $n OOP the encapsulation is mainly achieved by creatin! classes methods and properties. The class is (ind of a container or encapsulate the set of methods attribute and properties to provide to other classes.

the resources need for the classes expose public capsule or a cell which its indented functionalities

What Is Association? Association is a ")a)# relationship between two classes. $t allows one object instance to cause another to perform an action on its behalf. Association is the more !eneral term that define the relationship between two classes whereas the a!!re!ation and composition are relatively special. What Is Inheritance? $nheritance provides a powerful and natural mechanism for or!ani*in! and structurin! your software. Ability of a new class to be created from an existin! class by extendin! it is called inheritance. What Is Interface? An interface is a contract between a class and the outside world. +hen a class implements an interface it promises to provide the behavior published by that interface. $nterface can be used to define a !eneric template and then one or more abstract classes to define partial implementations of the interface. $nterfaces just specify the method declaration "implicitly public and abstract# and can contain properties "which are also implicitly public and abstract#. $nterface definition be!ins with the (eyword interface. An interface li(e that of an abstract class cannot be instantiated . What is Polymorphism? ,olymorphism is a !eneric term that means 'many shapes'. -ore precisely Polymorphisms mean the ability to re.uest that the same operations be performed by a wide ran!e of different types of thin!s. $n OOP the polymorphisms is achieved by usin! many different techni.ues named method overloadin! operator overloadin! and method overridin!. What Is a Package? /|CS30 ! C " Object Oriented Programming ,ercival A. Fernande*

A pac(a!e is a namespace for or!ani*in! classes and interfaces in a lo!ical manner. ,lacin! your code into pac(a!es ma(es lar!e software projects easier to mana!e.

0|CS30 ! C " Object Oriented Programming ,ercival A. Fernande*

Anda mungkin juga menyukai