You are on page 1of 7

A Project

On
Project Name…………………

Guided By: Submitted By:
Mr. Atul Verma Your Name
XII - Sec

T Computers) .” . I glad fully approved her piece of work. APPROVAL SHEET This is to certify that Mr.. Atul Verma (P.G. Your Name of class XII Sec has satisfactorily prosecuted the work assigns to her for the preparation of the project entitled “ Project name………. This is a bonafied work carried out by the above candidate in my supervision and guidance .

So. I am truly thankful to my computer teacher Mr. I am also thankful to my family members who were with me throughout the working period of this project and helped me both mentally & monetarily. side-by-side is also very necessary to keep you going on the right track. THANKS TO ALL. But continuous guidance & nourishment of experienced hands. And also for her unbiased help & guidance which provoked me to better & better. I am also thankful to my friends for their support and cooperation.” This saying goes very appropriate in today’s competitive atmosphere where you have to put in your best constantly to survive. specially in computers has helped me a lot & this project has enabled me to understand several concepts of c++ even more minutely. your name XII sec . Acknowledgment “Education is not filling-up of a pall but lightning of a fire. this projective and practical approach towards studies. apart from uor syllabus. Atul Verma who encouraged us to de something creative & constructive.

an object is considered to be an partitioned area of computer memory that stores data and set of operation that can access that data. OOP allows decomposition of a problem into a number of entities called objects and then built data and function around these objects.  Data structures are designed such that they characterize the objects. It ties data more closely to the function that operate on it. These include:  Objects  Classes  Data Abstraction and Encapsulation  Inheritance  Polymorphism  Dynamic Binding  Message Passing . Introduction to C++ The major motivating factor in the invention of object oriented approach is to remove some of the flaws encountered in the procedural approaches.  Object may communicate with each other through functions. Some of the striking features of object oriented programming are:  Emphasis is on the data rather than the procedure.” Thus. It is therefore important to have a working definition of object oriented programming before we proceed further. Since the memory partitions are independent. OOP treats data as a critical element in the program development and does not allow it to flow freely around the system.  Follows bottom up approach in program design. BASIC CONCEPT OF OBJECT ORIENTED PROGRAMMING It is necessary to understand some of the concept used extensively in object oriented programming. and protects it from accidental modification from outside function.  Functions that operate on the data of an object are tied together in the data structure. the object can be used in a variety of different programs without modification. We define “Object oriented programming as an approach that provides a way of modularizing programs by creating partitioned memory area for both data and function that can be used as template for creating copies of such modules on demand. Object oriented programming is the most recent concept among programming paradigms and still means different things to different peoples.  Data is hidden and cannot be accessed by external functions.  Programs are divided into what are known as objects.  New data and functions can easily be added wherever necessary.

The data is not accessible to the outside world. Object take up space in the memory and have an associated address like a record in Pascal or a structure in C. apple and orange are the member of class fruit. Object: STUDENT DATA Name Date-of-Birth Marks FUNCTIONS Total Average Display Program object should be chosen such that they match closely with the real world objects. Programming problem analysis in terms of objects and the nature of communication between them. we can create any number of objects belonging to that class. They may also represent user defined data such as vectors. The syntax used to create an object is no different than the syntax used to create an inter object in C. When a program is executed. a table of data or any item that the program has to handle. and only those functions which are wrapped in the class can access it. a bank account. Data encapsulation is the most striking feature of a class. This insulation of data from direct access by the program is called data hiding or information hiding. . The entire set of data and code of an object can be made a user defined data type with the help of a class. Classes use the concept of abstraction and are defined as a list of abstract attributes such as size.Objects Objects are basic run time entities in an object oriented system. weight and cost. time and list. DATA ABSTRACTION AND ENCAPSULATION The wrapping up of data and functions into a single unit (called class) is known as Encapsulation. Classes are user defined data type and behave like the built-in type of programming language. A class is thus a collection of objects of similar type. and code to manipulate that data. Once a class has been defined. They may represent a person. CLASSES We jest mention that objects contain data. Abstraction refers to the act of representing essential features without including the background detail or explanation. and factions to operate on these attributes. the object interacts by sending message to one another. For example mango. These functions provide the interface between the object’s data and the program. Objects are variables of the type class.

a Greek term. The principle behind this sort of division is that each derived class shares common characteristics with the class from which it is derived. It support the concept of Hierarchical classification.They encapsulate all the essential properties of the object that are to be created. In OOP. means the ability to take more than one form. POLYMORPHISM Polymorphism is another important OOP concept. The new class will have the combined features of both the classes. the concept of inheritance provides the idea of reusability. This is possible by deriving a new class from the existing one. The real appeal and power of the inheritance mechanism is that it allows the programmer to tailor a class in such a way that it does not introduces any undesirable side effects into the rest of the classes. The behavior depends upon the type of data used in the operation. The functions that operate on these data are sometimes called methods or member functions. they are known as Abstract Data Types. This means that we can add additional features to an existing class without modifying it. The attributes are sometimes called data members because they hold information. An operation may exhibit different behavior in different instances. . INHERITANCE Inheritance is the process by which objects of one class acquire the property of the objects of another class. Polymorphism. Since the classes use the concept of data anbstraction. Shape Draw() Circle Box Object Triangle Object Object Draw(circle) Draw(box) Draw(triangle) Polymorphism plays an important role in allowing object having different internal structure to share the same external interface. This means that a general class of operation may be accessed in the same manner even though specific action associated with each operation may differ. Polymorphism is extensively used in implementing inheritance. The process of making an operator to exhibit different behaviors in different instances is known as operator overloading.

 The data-centered design approach enables us to capture more detail of a model in implementable form. rather than having to start writing the code from the scratch. . therefore.  Establishing communication among objects. the name of the function and the information to be sent. BENEFITS OF OOP  OOP offers several benefits to both the program designer and the user.DYNAMIC BINDING Binding refers to the linking of a procedure call to the code to be executed in response to the call. MESSAGE PASSING An object oriented consists of a set of objects that communicate with each other.  Object oriented system can be easily upgraded from small to large systems.  We can build program from the standard working module that communicate with one another.  It is easy to partition the work in the project based on the objects. we can eliminate redundant code and extend the use of existing classes. It is associated with polymorphism and inheritance.  It is possible to map objects in the problem domain to those in the program. The process of programming in an object-oriented language. A function call associated with a polymorphic reference depends on the dynamic type of that reference. The concept of message passing makes it easier to talk about building systems that directly model or simulate their real world counterparts.  It is possible to have multiple instances of an object to co-exist without any interference. A message for an object is a request for exception for a procedure. involves the following basic steps:-  Creating classes that define object and their behavior. Object communicate with one another by sending and receiving information much the same way as people pass messages to one another.  Creating objects from class definition and. The principle advantages are:  Through inheritance. Dynamic Binding means that the code associated with a given procedure call is not known until the time of call at run-time. Message passing involves specifying the name of the object. and therefore will invoke a function in the receiving object that generates the desired result.  The principle of hiding the data helps the programmer to built secure program that cannot be invaded by code in other part of the program.