Basic To Advance
C++ Introduction
What is C++?
What is C++?
=> The C++ programming language was designed and implemented by at AT & T Bell laboratories as a Successor of C. it also add many powerful new features and capabilities C++ evolved from C with class which was invented in 1980 as a for writing efficient even driven Simulations. Several E-ideas were derived from Simula 67 and ALGOL 68 programming language. It supports the features such as classes with inheritance and virtual function derived from the Similar 67 language and operator overloading derive from ALGOL 68.
What is object-oriented programming?
=> Object Oriented programming contains the Concepts of procedure Oriented programming and also added Some additional Concepts. In object-oriented programming the name focus is on that data (member) that is to be used rather than the method (function). Once the data, which is to be used is decided then the different function that will operate on this data are in find. Thus, it follows bottom-up approach. Object Oriented programming allows decomposition of a problem in to a no of intities Called as object then builds data and function around these objects.
Note: -
1. In object Oriented programming the data is hidden which Can’t be access directly by any outside function.
2. If you the want to access or modify the data of an object then you should know the different function which are associated with these Object.
3. Objects can pass message to each other through the help of function.
Same examples of OOP are:
C++, Small talk, Eiffel, common lisp.
Object system (CLOS), pascal, Java, ADE -95 etc.
Application of Object-oriented programming
- 1. User Interface design such as window.
- 2. ORDBMS
- 3. OODBMS
- 4. Expert System
- 5. Artificial Intelligence (which help in decision making)
- 6. MIS (Management information system)
- 7. DSS (Decision Support system)
Structure of Oops
There are following features of object-oriented programming System.
1. Object
2. Class
3. Inheritance
4. Encapsulation
5. Data hiding
6. Polymorphing
7. Message Passing
1. What is Object:-
=> An object an identifiable entity with Some properties candy behavior. An object can be thought of as a real life entity, which can be represent a person, thing, animal and place or any item that the program has to handle.
Different System Can have different object such as :
1. Employee in payroll. System.
2. Item in inventory system,
3. Customer in Banking System.
4. Book in Library system,
5. Windows menu icons in GUI environment.
6. Linked list, Stacks and quare in data structure.
Syntax 1. class name object name;
Object
Ex -- University U1, U2, Un;
2. What is Class : -
=> A class represents a set of objects that Share common properties and behavior. Class is a user define datatype which consists of and member functions object. Classes are declared using the keyword class follow by class member. which are of same type.
3. What is Inheritance:-
=> The technique of creating new classes from an Existing Class called as Inheritance. The Old class or existing class is known base or parent class and the newly created class is called as derive class or child class. The Concept of Inheritance provides the idea of reusability this means that we can add additional features to an existing class Without modifying it This is possible by deriving a new class from the existing one. The new class will have all the all the features of existing class. It Can likewise add a few additional highlights to this class. There are following types of inheritance.
There are four types of inheritance
1. Single inheritance
2. Multiple inheritance
3. Multilevel inheritance
4. Hybrid inheritance
5. Hierarchical inheritance
4. What is Encapsulation: –
Encapsulation is a way to bind member (data) & member function function into a single unit is called as Encapsulation.
5.Data hiding: - Some of abstracted properties becomes vary important and its not be visible data hiding is a facility that provide the mechanism to hide the properties from groups of properties. Data hiding provide data security approach.
6. What is Polymorphism:-
=> Polymorphism each important features of object-oriented programming systems. Oops in this tetanic same type of structure can be used in multiple form. Such as more then one function can have same name and it can be used very efficiently the compiler selects the function according to the parameter of function for execution.
There are
two types of polymorphism.
1.
Early binding (compiler
time polymorphism)
2. Late binding/Dynamic binding (Run Time)
1. Early Binding(compile time polymorphism)
=> During compile time choose a function in normal day is called as early binding or static binging static likes. During compiles time compiler determines which function is used best on the parameters past two the function returns time. The compiler then substitutes the correct function for each in invocation.
Ex of early binding
1.
Function overloading
2. Operator overloading
2. Late Binding /Dynamic binding (Run Time)
=> choosing function during execution time is Called as late binding or dynamic binding or dynamic Link as, linker. fetch binding requires Some overhead but provides increased power & flexibility. The binding is implemented throw Vercuil function. And object class must be decried as a pointer to a Class or reference to a class.
Ex of Late binding: -
i. virtual function
ii. pure virtual function
7. What is Message Passing:- The act of Communicating with and object to get sum thing Done is called has massaging or massage passing.
It Consist off calling a method secretor (sapling that method with information it requires and receiving a reply from the method and of object oriented program Contest of a set of objects that Communicate which each other the process include following steps.
Step 1- Creating class that define object and variable.
Sept 2- Creating objects from class definition.
Step 3 - Establish communication among object.
ex- Method - Small (all letter small)
Object- small (All letter small)
Class- first letter capital
shape draw (circle)
=> In the above Example shape is the object name draw is the massage and cycle is the information.
Advantage of oops
1. Dah hiding features a void miss use of data.
2. Reusability of Code is possible using in heritense.
3. objects Can be easily created when ever required.
4. Object oriented system can be easily upgraded from small to large system.
5. Error direction or correction become selection.
6. Large Project can be easily divided into different modules and can be integrated after wards thus leading into less time and going maximum productivity.
7. Software complexity van be easily manage.
• What is Data Abstraction
=> Data abstraction is a tactic in which the must important property are selected, it is the basic building blog of class. Abstraction refence to the acts of represting incisal features without including back gram deities or exclamation.
There are two type of data abstraction.
1. Generalization
2. Specialization
1. What is Generalization: -
=> Generalization is the viewing of data of entities from higher level to the lower level. It means first to design a model of university. First it is view university when the university is divided in to college and college is divided into different course.
2. What is Specialization: -
=> Specialization is Just reverse of generalization it is viewing as lower level to higher level. A student have followed following property Such as name, age, marks, address, height, Color etc. from some pecopteris name, age roll no, marks are important so that this property will be selected first rest property such as Color height are not selected for entity Student.
**Author Name- legendHacker **
*****More Point is working ("Please wait few days")****
0 Comments