This document discusses the key concepts of object-oriented programming (OOP). It covers the basic features of OOP like emphasis on data over procedures, dividing programs into objects, and defining data structures to characterize objects. It also discusses important OOP concepts like classes, encapsulation, inheritance, polymorphism, and dynamic binding. The document provides examples to illustrate these concepts and highlights benefits of the OOP paradigm like code reusability and modularity.
C++ is an enhanced version of the C language. C++ includes everything that is part of C language and adds support for object oriented programming (OOP). With very few, very major exceptions, C++ is a superset of C
The document outlines the syllabus for the II Year / III Semester 20IT302 - C++ AND DATA STRUCTURES course. It covers 5 units - (1) Object Oriented Programming Fundamentals, (2) Object Oriented Programming Concepts, (3) C++ Programming Advanced Features, (4) Advanced Non-Linear Data Structures, and (5) Graphs. Some key concepts covered include classes, objects, encapsulation, inheritance, polymorphism, templates, containers, iterators, trees, and graph algorithms.
The document discusses object-oriented programming and how it relates to assembling a computer system from components. It states that object-oriented programming works similarly by making a program up of different self-contained objects that can communicate with each other in predefined ways, just like computer components fit together and communicate. It then provides a problem statement for building an order management system and outlines the contents to be covered related to basic C++ concepts.
C++ [ principles of object oriented programming ]Rome468
C++ is an enhanced version of C that adds support for object-oriented programming. It includes everything in C and allows for defining classes and objects. Classes allow grouping of related data and functions, and objects are instances of classes. Key concepts of OOP supported in C++ include encapsulation, inheritance, and polymorphism. Encapsulation binds data and functions together in a class and allows hiding implementation details. Inheritance allows defining new classes based on existing classes to reuse their functionality. Polymorphism enables different classes to have similarly named functions that demonstrate different behavior.
The document provides an introduction to object-oriented programming concepts. It discusses procedural programming and its limitations. It then introduces key concepts of OOP like objects, classes, encapsulation, inheritance, polymorphism, and message passing. It explains how OOP addresses issues like code reuse and maintenance. The document also discusses benefits of OOP and its applications. It concludes by comparing C and C++, highlighting features like classes, objects, and inheritance that make C++ an object-oriented language.
The document discusses object-oriented programming concepts in C++ including classes, objects, encapsulation, inheritance, polymorphism, and more. It provides examples of class definitions and accessing class members. Key points covered include:
- Classes are templates that define objects, while objects are instances of classes.
- Encapsulation involves wrapping data and functions together in a class. Inheritance allows classes to acquire properties from other classes.
- Polymorphism allows a method to perform different actions based on parameters. Message passing involves communication between objects.
- Structured programming divides a program into functions and data, while object-oriented programming divides it into objects that contain data and functions.
The document discusses object-oriented programming (OOP) and compares it to procedure-oriented programming. It covers key concepts of OOP like objects, classes, encapsulation, inheritance, polymorphism, and message passing. It also discusses benefits of OOP like reusability, extensibility and managing complexity. The document provides examples of OOP concepts and differences between C and C++ programming languages.
The document provides an overview of various programming techniques including procedural programming, modular programming, and object-oriented programming. It then discusses key concepts in C++ like data types, variables, constants, input/output streams, and basic program structure. A sample "Hello World" program is included and explained to demonstrate fundamental C++ syntax and program execution.
Object oriented programming 7 first steps in oop using c++Vaibhav Khanna
Advantages of C++
Portability. C++ offers the feature of portability or platform independence which allows the user to run the same program on different operating systems or interfaces at ease. ...
Object-oriented. ...
Multi-paradigm. ...
Low-level Manipulation. ...
Memory Management. ...
Large Community Support. ...
Compatibility with C. ...
Scalability.
The document discusses object-oriented programming (OOP) and some of its key concepts. It explains that OOP aims to address flaws in procedural programming by tying data more closely to the functions that operate on it. Some important OOP concepts mentioned include objects, classes, encapsulation, inheritance, polymorphism, and message passing. The document also lists several benefits of OOP like code reuse through inheritance and easier management of complex software. It provides examples of areas where OOP has common applications.
The document discusses object-oriented programming (OOP) and some of its key concepts. It explains that OOP aims to address flaws in procedural programming by tying data more closely to the functions that operate on it. Some important OOP concepts mentioned include objects, classes, encapsulation, inheritance, polymorphism, and message passing. The document also lists several benefits of OOP like code reuse through inheritance and easier management of complex software. It provides examples of areas where OOP has common applications.
Object Oriented Programming For Engineering Students as well as for B.Tech -IT. Covers Almost All From The Basics.
For more:
Google Search:: Prabhaharan Ellaiyan
This document provides an overview of the C++ programming language, including its history, features, and key concepts. It discusses how C++ extends the C language and is an intermediate-level language that incorporates both high-level and low-level features. The document also outlines important C++ concepts like object-oriented programming, data types, operators, variables, classes, and control structures. It provides examples and definitions of objects, classes, encapsulation, inheritance, polymorphism and other fundamental OOP concepts.
Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with..
This document provides an overview of object-oriented programming concepts in C++. It begins with a comparison of procedure-oriented programming and object-oriented programming. Key concepts of OOP like objects, classes, encapsulation, inheritance, and polymorphism are then explained. The basic structure of a C++ program including header files, functions, variables and data types, input/output operators, and comments is also covered at a high level.
The document provides an overview of object-oriented programming concepts in C++. It discusses key OOP concepts like objects, classes, encapsulation, inheritance and polymorphism. It also covers procedural programming in C++ and compares it with OOP. Examples are provided to demonstrate creating classes, objects, functions, constructors and destructors. The document contains information on basic C++ programming concepts needed to understand and implement OOP principles in C++ programs.
Object-oriented programming focuses on data. An object is a basic run-time entity. A class is also known as a user-defined data type. Inheritance provides the idea of reusability. Objects can communicate with each other through message passing. Polymorphism is achieved through operator overloading and function overloading.
This document provides an overview of object-oriented programming (OOP) concepts like objects, classes, abstraction, encapsulation, inheritance, and polymorphism. It also discusses OOP principles and how they are implemented in C++. Key points include: OOP aims to model real-world entities and their relationships via objects and classes; classes act as blueprints that define objects; abstraction hides unnecessary details; encapsulation bundles related data and functions; inheritance allows code reusability; and polymorphism allows one interface to work with multiple forms. The document also contrasts compile-time vs. runtime polymorphism.
1. The document discusses object oriented programming concepts like classes, objects, inheritance, and polymorphism in C++.
2. It begins with an introduction to procedural programming and its limitations. Object oriented programming aims to overcome these limitations by emphasizing data over procedures and allowing for inheritance, polymorphism, and encapsulation.
3. The document then covers key OOP concepts like classes, objects, constructors, and static class members in C++. It provides examples of creating classes and objects.
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...apidays
Building Green Software: How Cloud-Native Platforms Can Power Sustainable App Development
Katya Dreyer-Oren, Lead Software Engineer at Heroku (Salesforce)
Marissa Jasso, Product Manager at Heroku (Salesforce)
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
Convene 360 Madison, New York
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
The document discusses object-oriented programming concepts in C++ including classes, objects, encapsulation, inheritance, polymorphism, and more. It provides examples of class definitions and accessing class members. Key points covered include:
- Classes are templates that define objects, while objects are instances of classes.
- Encapsulation involves wrapping data and functions together in a class. Inheritance allows classes to acquire properties from other classes.
- Polymorphism allows a method to perform different actions based on parameters. Message passing involves communication between objects.
- Structured programming divides a program into functions and data, while object-oriented programming divides it into objects that contain data and functions.
The document discusses object-oriented programming (OOP) and compares it to procedure-oriented programming. It covers key concepts of OOP like objects, classes, encapsulation, inheritance, polymorphism, and message passing. It also discusses benefits of OOP like reusability, extensibility and managing complexity. The document provides examples of OOP concepts and differences between C and C++ programming languages.
The document provides an overview of various programming techniques including procedural programming, modular programming, and object-oriented programming. It then discusses key concepts in C++ like data types, variables, constants, input/output streams, and basic program structure. A sample "Hello World" program is included and explained to demonstrate fundamental C++ syntax and program execution.
Object oriented programming 7 first steps in oop using c++Vaibhav Khanna
Advantages of C++
Portability. C++ offers the feature of portability or platform independence which allows the user to run the same program on different operating systems or interfaces at ease. ...
Object-oriented. ...
Multi-paradigm. ...
Low-level Manipulation. ...
Memory Management. ...
Large Community Support. ...
Compatibility with C. ...
Scalability.
The document discusses object-oriented programming (OOP) and some of its key concepts. It explains that OOP aims to address flaws in procedural programming by tying data more closely to the functions that operate on it. Some important OOP concepts mentioned include objects, classes, encapsulation, inheritance, polymorphism, and message passing. The document also lists several benefits of OOP like code reuse through inheritance and easier management of complex software. It provides examples of areas where OOP has common applications.
The document discusses object-oriented programming (OOP) and some of its key concepts. It explains that OOP aims to address flaws in procedural programming by tying data more closely to the functions that operate on it. Some important OOP concepts mentioned include objects, classes, encapsulation, inheritance, polymorphism, and message passing. The document also lists several benefits of OOP like code reuse through inheritance and easier management of complex software. It provides examples of areas where OOP has common applications.
Object Oriented Programming For Engineering Students as well as for B.Tech -IT. Covers Almost All From The Basics.
For more:
Google Search:: Prabhaharan Ellaiyan
This document provides an overview of the C++ programming language, including its history, features, and key concepts. It discusses how C++ extends the C language and is an intermediate-level language that incorporates both high-level and low-level features. The document also outlines important C++ concepts like object-oriented programming, data types, operators, variables, classes, and control structures. It provides examples and definitions of objects, classes, encapsulation, inheritance, polymorphism and other fundamental OOP concepts.
Introduction to C++ : Object Oriented Technology, Advantages of OOP, Input- output in
C++, Tokens, Keywords, Identifiers, Data Types C++, Derives data types. The void data
type, Type Modifiers, Typecasting, Constant
C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with..
This document provides an overview of object-oriented programming concepts in C++. It begins with a comparison of procedure-oriented programming and object-oriented programming. Key concepts of OOP like objects, classes, encapsulation, inheritance, and polymorphism are then explained. The basic structure of a C++ program including header files, functions, variables and data types, input/output operators, and comments is also covered at a high level.
The document provides an overview of object-oriented programming concepts in C++. It discusses key OOP concepts like objects, classes, encapsulation, inheritance and polymorphism. It also covers procedural programming in C++ and compares it with OOP. Examples are provided to demonstrate creating classes, objects, functions, constructors and destructors. The document contains information on basic C++ programming concepts needed to understand and implement OOP principles in C++ programs.
Object-oriented programming focuses on data. An object is a basic run-time entity. A class is also known as a user-defined data type. Inheritance provides the idea of reusability. Objects can communicate with each other through message passing. Polymorphism is achieved through operator overloading and function overloading.
This document provides an overview of object-oriented programming (OOP) concepts like objects, classes, abstraction, encapsulation, inheritance, and polymorphism. It also discusses OOP principles and how they are implemented in C++. Key points include: OOP aims to model real-world entities and their relationships via objects and classes; classes act as blueprints that define objects; abstraction hides unnecessary details; encapsulation bundles related data and functions; inheritance allows code reusability; and polymorphism allows one interface to work with multiple forms. The document also contrasts compile-time vs. runtime polymorphism.
1. The document discusses object oriented programming concepts like classes, objects, inheritance, and polymorphism in C++.
2. It begins with an introduction to procedural programming and its limitations. Object oriented programming aims to overcome these limitations by emphasizing data over procedures and allowing for inheritance, polymorphism, and encapsulation.
3. The document then covers key OOP concepts like classes, objects, constructors, and static class members in C++. It provides examples of creating classes and objects.
apidays New York 2025 - Building Green Software by Marissa Jasso & Katya Drey...apidays
Building Green Software: How Cloud-Native Platforms Can Power Sustainable App Development
Katya Dreyer-Oren, Lead Software Engineer at Heroku (Salesforce)
Marissa Jasso, Product Manager at Heroku (Salesforce)
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
Convene 360 Madison, New York
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
apidays New York 2025 - Fast, Repeatable, Secure: Pick 3 with FINOS CCC by Le...apidays
Fast, Repeatable, Secure: Pick 3 with FINOS CCC
Leigh Capili, Kubernetes Contributor at Control Plane
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
apidays Singapore 2025 - 4 Identity Essentials for Scaling SaaS in Large Orgs...apidays
4 identity factors you didn't know you needed to support large organizations in your SaaS
Daizen Ikehara, Principal Developer Advocate at Auth0
apidays Singapore 2025
Where APIs Meet AI: Building Tomorrow's Intelligent Ecosystems
April 15 & 16, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
apidays New York 2025 - Building Scalable AI Systems by Sai Prasad Veluru (Ap...apidays
Building Scalable AI Systems: Cloud Architecture for Performance
Sai Prasad Veluru, Software Engineer at Apple Inc
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
THE FRIEDMAN TEST ( Biostatics B. Pharm)JishuHaldar
The Friedman Test is a valuable non-parametric alternative to the
Repeated Measures ANOVA, allowing for the comparison of three or
more related groups when data is ordinal or not normally distributed.
By ranking data instead of using raw values, the test overcomes the
limitations of parametric tests, making it ideal for small sample sizes and
real-world applications in medicine, psychology, pharmaceutical
sciences, and education. However, while it effectively detects differences
among groups, it does not indicate which specific groups differ, requiring
further post-hoc analysis.
apidays New York 2025 - Unifying OpenAPI & AsyncAPI by Naresh Jain & Hari Kri...apidays
Unifying OpenAPI & AsyncAPI: Designing JSON Schemas+Examples for Reuse
Naresh Jain, Co-founder & CEO at Specmatic
Hari Krishnan, Co-founder & CTO at Specmatic
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
METHODS OF DATA COLLECTION (Research methodology)anwesha248
The important methods of data collection along with advantages and disadvantages are published in this power point presentation.
published by- Prateeti Anwesha Bordoloi, Research Scholar
Mahapurusha Srimanta Sankaradeva Vishwavidyalaya
June 2025
apidays New York 2025 - Two tales of API Change Management by Eric Koleda (Coda)apidays
Two tales of API Change Management from my time at Google
Eric Koleda, Developer Advocate at Coda
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
Convene 360 Madison, New York
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
apidays New York 2025 - Beyond Webhooks: The Future of Scalable API Event Del...apidays
Beyond Webhooks: The Future of Scalable API Event Delivery
Phil Leggetter, Head of Developer Experience at Hookdeck
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
What is FinOps as a Service and why is it Trending?Amnic
The way we build and scale companies today has changed forever because of cloud adoption. However, this flexibility introduces unpredictability, which often results in overspending, inefficiencies, and a lack of cost accountability.
FinOps as a Service is a modern approach to cloud cost management that combines powerful tooling with expert advisory to bring financial visibility, governance, and optimization into the cloud operating model, without slowing down the engineering team. FinOps empowers the engineering team, finance, and leadership/management as they make data-informed decisions about cost, together.
In this presentation, we will break down what FinOps is, why it matters more than ever, and a little about how a managed FinOps service can help organizations:
- Optimize cloud spend - without slowing down dev
- Create visibility into the cost per team, service, or feature
- Set financial guardrails while allowing autonomy in engineering
- Drive cultural alignment between finance, engineering, and product
This will guide and help whether you are a cloud-native startup or a scaling enterprise, and convert cloud cost into a strategic advantage.
apidays New York 2025 - Computers are still dumb by Ben Morss (DeepL)apidays
Computers are still dumb: bringing your AI magic to enterprises
Ben Morss, Developer Evangelist at DeepL
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
Convene 360 Madison, New York
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
apidays New York 2025 - Using GraphQL SDL files as executable API Contracts b...apidays
Using GraphQL SDL files as executable API Contracts
Hari Krishnan, Co-founder & CTO at Specmatic
apidays New York 2025
API Management for Surfing the Next Innovation Waves: GenAI and Open Banking
May 14 & 15, 2025
------
Check out our conferences at https://www.apidays.global/
Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8
Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io
Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/
Talks about presentation packages and their uses to man and how it functions being the best presentation package. Learn about presentation packages here with me
Report based on the findings of a quantitative research conducted by the research agency New Image Marketing Group, commissioned by the NGO Detector Media, compiled by PhD in Sociology Marta Naumova.
Philippine-Constitution-and-Law in hospitalitykikomendoza006
Ad
object oriented programming language in c++
2. C++ Evolution
The prime purpose of C++ programming was to add object
orientation to the C programming language, which is in
itself one of the most powerful programming languages.
C++ is regarded as a middle-level language, as it
comprises a combination of both high-level and low-level
language features.
C++ was developed by Bjarne Stroustrup starting in 1979 at
Bell Labs in Murray Hill, New Jersey, as an enhancement to
the C language and originally named C with Classes but
later it was renamed C++ in 1983.
C++ is a superset of C, and that virtually any legal C
program is a legal C++ program.
3. Procedure-oriented Programming
Some Characteristics exhibited by procedure-oriented
programming are:
• Emphasis is on doing things (algorithms).
• Large programs are divided into smaller programs known
as functions.
• Most of the functions share global data.
• Data move openly around the system from function to
function.
• Functions transform data from one form to another.
• Employs top-down approach in program design.
4. Object Oriented Programming
Some of the features of object oriented programming are:
Emphasis is on data rather than procedure
Element in the program development and does not allow it
to flow freely around the system
OOP allows decomposition of a problem into a number of
entities called objects and then builds data and function
around these
Programs are divided into what are known as objects
Functions that operate on the data of an object are ties
together in the data structure.
Data is hidden and cannot be accessed by external
function.
Objects may communicate with each other through
function.
Follows bottom-up approach in program design.
5. Basic Concepts of Object Oriented
Programming
These include:
Objects
Classes
Data abstraction and encapsulation
Inheritance
Polymorphism
6. Objects
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.
That is both data and function that operate on data are
bundled as a unit called as object.
Objects are the basic run time entities in an object-
oriented system. They may represent a person, a place,
a bank account, a table of data or any item that the
program has to handle. They may also represent user-
defined data such as time and lists.
9. Class
A class is a blueprint or prototype from which objects
are created.
Models the state and behavior of a real-world object.
This doesn't actually define any data, but it does define
what the class name means, that is, what an object of
the class will consist of and what operations can be
performed on such an object.
In fact, objects are variables of the type class.
For examples, Mango, Apple and orange members of
class fruit.
10. Abstraction
Data abstraction refers to, providing only essential
information to the outside word and hiding their
background details, i.e., to represent the needed
information in program without presenting the
details.
Classes use the concept of abstraction and are defined
as a list of abstract attributes such as size, wait, and
cost, and function operate on these attributes.
The attributes are some time called data members
because they hold information. The functions that
operate on these data are sometimes called methods or
member function.
11. Encapsulation
Encapsulation is placing the data and the functions
that work on that data in the same place. While
working with procedural languages, it is not always
clear which functions work on which variables but
object-oriented programming provides you framework
to place the data and the relevant functions together in
the same object.
12. Inheritance
One of the most useful aspects of object-oriented
programming is code reusability. As the name suggests
Inheritance is the process of forming a new class from
an existing class that is from the existing class called as
base class, new class is formed called as derived class.
This is a very important concept of object-oriented
programming since this feature helps to reduce the
code size
13. Polymorphism
Polymorphism, a Greek term, means the ability to take
more than on form.
The ability to use an operator or function in different
ways in other words giving different meaning to the
operators or functions is called polymorphism. Poly
refers to many. That is a single function or an operator
functioning in many ways different upon the usage is
called polymorphism.
14. The process of making an operator to exhibit different
behaviors in different instances is known as operator
overloading
Single function name can be used to handle different
number and different types of argument. This is
something similar to a particular word having several
different meanings depending upon the context. Using
a single function name to perform different type of
task is known as function overloading.
16. Benefits of OOP
Through inheritance, we can eliminate redundant
code extend the use of existing Classes
We can build programs from the standard working
modules that communicate with one another, rather
than having to start writing the code from scratch.
This leads to saving of development time and higher
productivity
The principle of data hiding helps the programmer to
build secure program that can not be invaded by code
in other parts of a programs
17. It is easy to partition the work in a project based on
objects.
Object-oriented system can be easily upgraded from
small to large system.
Software complexity can be easily managed.
18. Application of OOP
Real-time system
Simulation and modeling
Object-oriented data bases
AI and expert systems
Neural networks and parallel programming
Decision support and office automation systems
CIM/CAM/CAD systems
20. #include<iostream>
The #include directive instructs the compiler to
include the contents of the file enclosed within
angular brackets into the source file.
Contains declarations for the identifier cout and
operator <<
The header file iostream should be included at the
beginning of all programs that use input/output
statements.
21. using namespace std;
Namespace is a new concept introduced by the ANSI
C++ standards committee.
This defines a scope for the identifiers that are used in
a program.
Namespace: a naming context to distinguish between
different items with the same name
C++ namespace: contains classes, variables, constants,
functions, etc.
For using the identifier defined in the namespace
scope we must include the using directive
Here, std is the namespace where ANSI C++ standard
class libraries are defined.
22. cout << “ C++ is better than C.n”;
Causes the string in quotation marks to be displayed
on the screen.
This statement introduces two new C++ features,
1. cout
2. <<
The identifier cout is a predefined object that
represents the standard output stream in C++.
The operator << is called the insertion or put to
operator.
23. Comments
// C++ statement
C++ introduces a new comment symbol // (double
slash).
The double slash comment is basically a single line
comment. Multiline comments can be written as
follows:
// This is an example of
// C++ program to illustrate
// some of its features
24. The C comment symbols /*,*/ are still valid and are
more suitable for multiline comments. The following
comment is allowed:
/* This is an example of
C++ program to illustrate
some of its features
*/
25. AVERAGE OF TWO NUMBERS
#include<iostream> // include header file
using namespace std;
int main()
{
float number1, number2, sum, average;
cout << “Enter two numbers:”;
cin >> number1; // Read Numbers
cin >> number2; // from keyboard
sum = number1 + number2;
average = sum/2;
cout << ”Sum = “ << sum << “n”;
cout << “Average = “ << average << “n”;
return 0;
} //end of example
26. The output would be:
Enter two numbers: 6.5 7.5
Sum = 14
Average = 7
27. cin >> number1
Is an input statement and causes the program to wait
for the user to type in a number. The number keyed in
is placed in the variable number1.
The operator >> is known as extraction or get from
operator.
28. cout << ”Sum = “ << sum << “n”;
Cascading of I/O Operators
The statement First sends the string “Sum = “ to cout and
then sends the value of sum. Finally, it sends the newline
character so that the next output will be in the new line.
Using the cascading technique, the last two statements can
be combined as follows:
1. Cout << “Sum = “ << sum << “n”
<< “Average = “ << average << “n”;
2. Cout << “Sum = “ << sum << “,”
<< “Average = “ << average << “n”;
We can also cascade input operator >> as shown below:
Cin >> number1 >> number2;
29. Example with Class
One of the major features of C++ is classes. They provide a method of binding
together data and functions which operate on them.
#include<iostream> // include header file
using namespace std;
class person
{
char name[30];
Int age;
public:
void getdata(void);
void display(void);
};
void person :: getdata(void)
{
cout << “Enter name: “;
cin >> name;
cout << “Enter age: “;
cin >> age;
30. Void person : : display(void)
{
cout << “nNameame: “ << name;
cout << “nAge: “ << age;
}
Int main()
{
person p;
p.getdata();
p.display();
Return 0;
} //end of example
The output of program is:
Enter Name: Ravinder
Enter age:30
Name:Ravinder
Age: 30