Object-oriented programming - Brieflynotes | Object Oriented Concept Using C++

Object Oriented Programming Language

Object orienting artificial language

A PC could be a tool to unravel a large vary of issues. The solutions to the issues square measure within the style of PC programs or application package. These programs square measure written employing a chosen artificial language.

A computer virus operates on a group of well-known computer file things. The program transforms this knowledge|input file|computer file} into a group of excepted data things. solely this set of excepted information things should be the output of the PC program. within the early programming languages the input and output information things were delineate as variables. information varieties classified these computer file things. management statements provided the way of instructing the PC on the operations that require to be performed on the information things.

Programming language have another use. they assist North American country in organizing our ideas concerning the answer of the matter. because the issues being resolved or the applications being resolved or the applications being developed became complicated, this side of programming languages became important. several programming languages emerged to deal with this issue along side the benefit of instructing the PC.

It was completed that viewing the answer of a drag as 2 separate segments 'data' and 'operations' doesn't jibe the method masses solve the $64000 life issues.

Object orienting thought victimization C++

Object orienting Programming Languages like C++ square measure supported the method masses unremarkable influence the complicated aspects of world. it's been ascertained that masses unremarkable solve world issues by characteristic distinct objects required for the answer. masses then acknowledge the connection among st these objects. The relationships square measure like 'Part of the whole' or square measure 'a sort of'. straightforward skills like recognizing that one object could be a a part of the larger object and one object could be a kind of another object square measure providing  to be important in determination issues in world. Object orienting programming facilitates this fashion of downside determination b y combining 'data' and 'operations' that square measure to be performed on the information.

In different words, the set of knowledge things is split into smaller teams such a {group|a collection} of operations are often performed on this group while not business the other perform. This cluster of knowledge and also the operations along square measure termed - 'object'. the operations represent the behavior of the thing. associate object tries to capture a true world object in an exceedingly program.

For example, take a glance at any calculator, it's each state and behavior. Its state refers to its physical options like its dimensions, buttons, visual display unit, operators and also the like. Its behavior refers  to the sort of functions it will perform like addition, subtraction, storing in memory, erasing, memory and also the like.

Object - calculator
Data :
Number 1, result, operator, Number_backup

Functions :
Addition()
Subtraction()
Erase_Memory()
Display_Result()

An object could be a cluster of connected functions and information that serves those functions.
An object could be a quite a self-sufficing "subprogram" with a selected useful space.

The process of grouping information and its connected functions into units known as as objects paves method for encapsulation.

The mechanism by that the information associated functions square measure sure along among an object definition is termed as ENCAPSULATION.

It is straight forward to ascertain however a checking account, a student, a bird, a car, a chair etc., embodies each state and behavior. it's this a likeness to real things that provides objects abundant of their power and charm. Objects create it straightforward to represent real systems in package programs.

Examples of objects - checking account & STUDENTS

BANK ACCOUNT

Data:
Account variety - long int
Name - char[15]
Opening balance -float;
Account sort - char

Functions :
Accept_Details()
Display_Details()
Update_opening_balance()
Withdrawal()
Deposit()

STUDENT

Data :
Date_of_birth - char[10]
Name - char[15];
Class, sec char[4];
Marks float

Functions :
Accept_Details()
Display_Details()
Total()
Average()
Grading()



Previous
Next Post »