SlideShare a Scribd company logo
2
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.
• It is possible to have multiple instances of an object to co-exist
without any interference.
Most read
3
Benefits of OOP
• It is possible to map object in the problem domain to
those in the program.
• It is easy to partition the work in a project based on
objects.
• The data-centered design approach enables us to
capture more detail of a model can implemental form.
• Object-oriented system can be easily upgraded from
small to large system.
• Message passing techniques for communication
between objects makes to interface descriptions with
external systems much simpler.
• Software complexity can be easily managed.
Most read
4
Application of OOP
• Real-time system
• Simulation and modeling
• Object-oriented data bases
• Hypertext, Hypermedia, and expert system
• AI and expert systems
• Neural networks and parallel programming
• Decision support and office automation systems
• CIM/CAM/CAD systems
Most read
Object Oriented Programming: 7
First Steps in OOP using C++
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
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.
• It is possible to have multiple instances of an object to co-exist
without any interference.
Benefits of OOP
• It is possible to map object in the problem domain to
those in the program.
• It is easy to partition the work in a project based on
objects.
• The data-centered design approach enables us to
capture more detail of a model can implemental form.
• Object-oriented system can be easily upgraded from
small to large system.
• Message passing techniques for communication
between objects makes to interface descriptions with
external systems much simpler.
• Software complexity can be easily managed.
Application of OOP
• Real-time system
• Simulation and modeling
• Object-oriented data bases
• Hypertext, Hypermedia, and expert system
• AI and expert systems
• Neural networks and parallel programming
• Decision support and office automation systems
• CIM/CAM/CAD systems
Introduction of C++
• C++ is an object-oriented programming language.
• It was developed by Bjarne Stroustrup at AT&T Bell Laboratories in
Murray Hill, New Jersey, USA, in the early 1980’s.
• Stroustrup, an admirer of Simula67 and a strong supporter of C,
wanted to combine the best of both the languages and create a
more powerful language that could support object-oriented
programming features and still retain the power and elegance of C.
• The result was C++. Therefore, C++ is an extension of C with a major
addition of the class construct feature of Simula67.
• Since the class was a major addition to the original C language,
Stroustrup initially called the new language ‘C with classes’.
• However, later in 1983, the name was changed to C++. The idea of
C++ comes from the C increment operator ++, thereby suggesting
that C++ is an augmented version of C.
Introduction of C++
• The most important facilities that C++ adds on
to C are
– classes, inheritance,
– function overloading and
– operator overloading.
– These features enable creating of abstract data
types,
– inherit properties from existing data types and
support polymorphism, thereby making C++ a
truly object-oriented language.
Printing A String in C++
• #include<iostream>
• Using namespace std;
• int main()
• {
• cout<< “c++ is a very powerful Object
Oriented Programming Language n” ;
• return 0;
• }
Program feature
• Like C, the C++ program is a collection of
function.
• The above example contain only one function
main(). As usual execution begins at main().
• Every C++ program must have a main().
• C++ is a free form language.
• With a few exception, the compiler ignore
carriage return and white spaces.
• Like C, the C++ statements terminate with
semicolons.
Comments
• C++ comment symbol // (double slash) is used for single line
comments
• Comment start with a double slash symbol and terminate at the
end of the line.
• A comment may start anywhere in the line, and whatever follows
till the end of the line is ignored. (Note that there is no closing
symbol)
• 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
• */
Output operator
• cout<< “c++ is a very powerful Object Oriented
Programming Language n” ;
• Causes the string in quotation marks to be displayed on the
screen.
• This statement introduces two new C++ features, cout and
<<.
• The identifier cout (pronounced as C out) is a predefined
object that represents the standard output stream in C++.
• Here, the standard output stream represents the screen.
• The operator << is called the insertion (or put to) operator
The iostream File
• We have used the following #include directive
in the program:
• #include <iostream>
• The #include directive instructs the compiler
to include the contents of the file enclosed
within angular brackets into the source file.
Namespace
• 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. For using the identifier defined in the namespace
scope we must include the using directive, like
– Using namespace std;
• Here, std is the namespace where ANSI C++ standard class
libraries are defined.
• All ANSI C++ programs must include this directive.
• This will bring all the identifiers defined in std to the
current global scope.
• Using and namespace are the new keyword of C++.
Return Type of main()
• In C++, main () returns an integer value to the
operating system.
• Therefore, every main () in C++ should end
with a return (0) statement; otherwise a
warning an error might occur.
• Since main () returns an integer type for main
() is explicitly specified as int.
• Note that the default return type for all
function in C++ is int.
Assignment
• Discuss the benefits and applications of object
oriented programming
• Write a C++ program to print a string “Hello
World” on the console output. Briefly Explain
the elements of the program.

More Related Content

What's hot (20)

Object Oriented Programming ppt presentation
Object Oriented Programming ppt presentationObject Oriented Programming ppt presentation
Object Oriented Programming ppt presentation
AyanaRukasar
 
Attributes
AttributesAttributes
Attributes
Pooja Dixit
 
ASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS ANDASSIGNMENT STATEMENTS AND
ASSIGNMENT STATEMENTS AND
Damith Shan Abeywickrema
 
Database language
Database languageDatabase language
Database language
University of Science and Technology Chitttagong
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
Decision making and loop in C#
Decision making and loop in C#Decision making and loop in C#
Decision making and loop in C#
Prasanna Kumar SM
 
Functions in C++
Functions in C++Functions in C++
Functions in C++
Mohammed Sikander
 
C# Dot net unit-2.pdf
C# Dot net unit-2.pdfC# Dot net unit-2.pdf
C# Dot net unit-2.pdf
Prof. Dr. K. Adisesha
 
Rules for Variable Declaration
Rules for Variable DeclarationRules for Variable Declaration
Rules for Variable Declaration
uniprint
 
SQL select statement and functions
SQL select statement and functionsSQL select statement and functions
SQL select statement and functions
Vikas Gupta
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
Vineeta Garg
 
Sql ppt
Sql pptSql ppt
Sql ppt
Anuja Lad
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programming
Harshita Yadav
 
C program
C programC program
C program
AJAL A J
 
Building a Unified Data Pipeline with Apache Spark and XGBoost with Nan Zhu
Building a Unified Data Pipeline with Apache Spark and XGBoost with Nan ZhuBuilding a Unified Data Pipeline with Apache Spark and XGBoost with Nan Zhu
Building a Unified Data Pipeline with Apache Spark and XGBoost with Nan Zhu
Databricks
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
agorolabs
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
saikat rahman
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
CPD INDIA
 
C Tokens
C TokensC Tokens
C Tokens
Ripon Hossain
 
Object Oriented Programming ppt presentation
Object Oriented Programming ppt presentationObject Oriented Programming ppt presentation
Object Oriented Programming ppt presentation
AyanaRukasar
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
Decision making and loop in C#
Decision making and loop in C#Decision making and loop in C#
Decision making and loop in C#
Prasanna Kumar SM
 
Rules for Variable Declaration
Rules for Variable DeclarationRules for Variable Declaration
Rules for Variable Declaration
uniprint
 
SQL select statement and functions
SQL select statement and functionsSQL select statement and functions
SQL select statement and functions
Vikas Gupta
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
Vineeta Garg
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
Pooja mittal
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programming
Harshita Yadav
 
Building a Unified Data Pipeline with Apache Spark and XGBoost with Nan Zhu
Building a Unified Data Pipeline with Apache Spark and XGBoost with Nan ZhuBuilding a Unified Data Pipeline with Apache Spark and XGBoost with Nan Zhu
Building a Unified Data Pipeline with Apache Spark and XGBoost with Nan Zhu
Databricks
 
Java 101 Intro to Java Programming
Java 101 Intro to Java ProgrammingJava 101 Intro to Java Programming
Java 101 Intro to Java Programming
agorolabs
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
CPD INDIA
 

Similar to Object oriented programming 7 first steps in oop using c++ (20)

C++ Programming with examples for B.Tech
C++ Programming with examples for B.TechC++ Programming with examples for B.Tech
C++ Programming with examples for B.Tech
ashutoshgupta1102
 
object oriented programming language in c++
object oriented programming language in c++object oriented programming language in c++
object oriented programming language in c++
Ravikant517175
 
CS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semesterCS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semester
VeeraswamyDasari2
 
C++
C++C++
C++
Rome468
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to it
PushkarNiroula1
 
UNIT - 1- Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
UNIT - 1-  Ood ddnwkjfnewcsdkjnjkfnskfn.pptxUNIT - 1-  Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
UNIT - 1- Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
crazysamarth927
 
Procedure Oriented programming Object Oriented programming Basic Concept of ...
Procedure Oriented programming Object Oriented programming  Basic Concept of ...Procedure Oriented programming Object Oriented programming  Basic Concept of ...
Procedure Oriented programming Object Oriented programming Basic Concept of ...
Govt Engineering college badliya ajmer Rajasthan
 
Object Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptxObject Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptx
arjunkmyndai
 
Object Oriented Programming Using C++.pptx
Object Oriented Programming  Using C++.pptxObject Oriented Programming  Using C++.pptx
Object Oriented Programming Using C++.pptx
bscit6
 
Object Oriented Programming beigneers Lecture 01 (1).pptx
Object Oriented Programming  beigneers Lecture 01 (1).pptxObject Oriented Programming  beigneers Lecture 01 (1).pptx
Object Oriented Programming beigneers Lecture 01 (1).pptx
namrabsit
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
Sangharsh agarwal
 
73d32 session1 c++
73d32 session1 c++73d32 session1 c++
73d32 session1 c++
Mukund Trivedi
 
M.c.a (sem iii) paper - i - object oriented programming
M.c.a (sem   iii) paper - i - object oriented programmingM.c.a (sem   iii) paper - i - object oriented programming
M.c.a (sem iii) paper - i - object oriented programming
रवींद्र वैद्य
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
MZGINBarwary
 
Part 1
Part 1Part 1
Part 1
Moatez Amairi
 
@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf
TheertheshTheertha1
 
Principal of objected oriented programming
Principal of objected oriented programming Principal of objected oriented programming
Principal of objected oriented programming
Rokonuzzaman Rony
 
Prog1-L1.pdf
Prog1-L1.pdfProg1-L1.pdf
Prog1-L1.pdf
valerie5142000
 
Advantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptxAdvantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptx
phalapagol
 
c++ ppt.ppt
c++ ppt.pptc++ ppt.ppt
c++ ppt.ppt
FarazKhan89093
 
C++ Programming with examples for B.Tech
C++ Programming with examples for B.TechC++ Programming with examples for B.Tech
C++ Programming with examples for B.Tech
ashutoshgupta1102
 
object oriented programming language in c++
object oriented programming language in c++object oriented programming language in c++
object oriented programming language in c++
Ravikant517175
 
CS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semesterCS305PC_C++_UNIT 1 notes jntuh third semester
CS305PC_C++_UNIT 1 notes jntuh third semester
VeeraswamyDasari2
 
Introduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to itIntroduction to cpp language and all the required information relating to it
Introduction to cpp language and all the required information relating to it
PushkarNiroula1
 
UNIT - 1- Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
UNIT - 1-  Ood ddnwkjfnewcsdkjnjkfnskfn.pptxUNIT - 1-  Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
UNIT - 1- Ood ddnwkjfnewcsdkjnjkfnskfn.pptx
crazysamarth927
 
Object Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptxObject Oriented Programming Lecture 01.pptx
Object Oriented Programming Lecture 01.pptx
arjunkmyndai
 
Object Oriented Programming Using C++.pptx
Object Oriented Programming  Using C++.pptxObject Oriented Programming  Using C++.pptx
Object Oriented Programming Using C++.pptx
bscit6
 
Object Oriented Programming beigneers Lecture 01 (1).pptx
Object Oriented Programming  beigneers Lecture 01 (1).pptxObject Oriented Programming  beigneers Lecture 01 (1).pptx
Object Oriented Programming beigneers Lecture 01 (1).pptx
namrabsit
 
@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf@vtucode.in-module-1-c++-2022-scheme.pdf
@vtucode.in-module-1-c++-2022-scheme.pdf
TheertheshTheertha1
 
Principal of objected oriented programming
Principal of objected oriented programming Principal of objected oriented programming
Principal of objected oriented programming
Rokonuzzaman Rony
 
Advantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptxAdvantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptx
phalapagol
 
Ad

More from Vaibhav Khanna (20)

Information and network security 47 authentication applications
Information and network security 47 authentication applicationsInformation and network security 47 authentication applications
Information and network security 47 authentication applications
Vaibhav Khanna
 
Information and network security 46 digital signature algorithm
Information and network security 46 digital signature algorithmInformation and network security 46 digital signature algorithm
Information and network security 46 digital signature algorithm
Vaibhav Khanna
 
Information and network security 45 digital signature standard
Information and network security 45 digital signature standardInformation and network security 45 digital signature standard
Information and network security 45 digital signature standard
Vaibhav Khanna
 
Information and network security 44 direct digital signatures
Information and network security 44 direct digital signaturesInformation and network security 44 direct digital signatures
Information and network security 44 direct digital signatures
Vaibhav Khanna
 
Information and network security 43 digital signatures
Information and network security 43 digital signaturesInformation and network security 43 digital signatures
Information and network security 43 digital signatures
Vaibhav Khanna
 
Information and network security 42 security of message authentication code
Information and network security 42 security of message authentication codeInformation and network security 42 security of message authentication code
Information and network security 42 security of message authentication code
Vaibhav Khanna
 
Information and network security 41 message authentication code
Information and network security 41 message authentication codeInformation and network security 41 message authentication code
Information and network security 41 message authentication code
Vaibhav Khanna
 
Information and network security 40 sha3 secure hash algorithm
Information and network security 40 sha3 secure hash algorithmInformation and network security 40 sha3 secure hash algorithm
Information and network security 40 sha3 secure hash algorithm
Vaibhav Khanna
 
Information and network security 39 secure hash algorithm
Information and network security 39 secure hash algorithmInformation and network security 39 secure hash algorithm
Information and network security 39 secure hash algorithm
Vaibhav Khanna
 
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...
Vaibhav Khanna
 
Information and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authenticationInformation and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authentication
Vaibhav Khanna
 
Information and network security 35 the chinese remainder theorem
Information and network security 35 the chinese remainder theoremInformation and network security 35 the chinese remainder theorem
Information and network security 35 the chinese remainder theorem
Vaibhav Khanna
 
Information and network security 34 primality
Information and network security 34 primalityInformation and network security 34 primality
Information and network security 34 primality
Vaibhav Khanna
 
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
Vaibhav Khanna
 
Information and network security 32 principles of public key cryptosystems
Information and network security 32 principles of public key cryptosystemsInformation and network security 32 principles of public key cryptosystems
Information and network security 32 principles of public key cryptosystems
Vaibhav Khanna
 
Information and network security 31 public key cryptography
Information and network security 31 public key cryptographyInformation and network security 31 public key cryptography
Information and network security 31 public key cryptography
Vaibhav Khanna
 
Information and network security 30 random numbers
Information and network security 30 random numbersInformation and network security 30 random numbers
Information and network security 30 random numbers
Vaibhav Khanna
 
Information and network security 29 international data encryption algorithm
Information and network security 29 international data encryption algorithmInformation and network security 29 international data encryption algorithm
Information and network security 29 international data encryption algorithm
Vaibhav Khanna
 
Information and network security 28 blowfish
Information and network security 28 blowfishInformation and network security 28 blowfish
Information and network security 28 blowfish
Vaibhav Khanna
 
Information and network security 27 triple des
Information and network security 27 triple desInformation and network security 27 triple des
Information and network security 27 triple des
Vaibhav Khanna
 
Information and network security 47 authentication applications
Information and network security 47 authentication applicationsInformation and network security 47 authentication applications
Information and network security 47 authentication applications
Vaibhav Khanna
 
Information and network security 46 digital signature algorithm
Information and network security 46 digital signature algorithmInformation and network security 46 digital signature algorithm
Information and network security 46 digital signature algorithm
Vaibhav Khanna
 
Information and network security 45 digital signature standard
Information and network security 45 digital signature standardInformation and network security 45 digital signature standard
Information and network security 45 digital signature standard
Vaibhav Khanna
 
Information and network security 44 direct digital signatures
Information and network security 44 direct digital signaturesInformation and network security 44 direct digital signatures
Information and network security 44 direct digital signatures
Vaibhav Khanna
 
Information and network security 43 digital signatures
Information and network security 43 digital signaturesInformation and network security 43 digital signatures
Information and network security 43 digital signatures
Vaibhav Khanna
 
Information and network security 42 security of message authentication code
Information and network security 42 security of message authentication codeInformation and network security 42 security of message authentication code
Information and network security 42 security of message authentication code
Vaibhav Khanna
 
Information and network security 41 message authentication code
Information and network security 41 message authentication codeInformation and network security 41 message authentication code
Information and network security 41 message authentication code
Vaibhav Khanna
 
Information and network security 40 sha3 secure hash algorithm
Information and network security 40 sha3 secure hash algorithmInformation and network security 40 sha3 secure hash algorithm
Information and network security 40 sha3 secure hash algorithm
Vaibhav Khanna
 
Information and network security 39 secure hash algorithm
Information and network security 39 secure hash algorithmInformation and network security 39 secure hash algorithm
Information and network security 39 secure hash algorithm
Vaibhav Khanna
 
Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...Information and network security 38 birthday attacks and security of hash fun...
Information and network security 38 birthday attacks and security of hash fun...
Vaibhav Khanna
 
Information and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authenticationInformation and network security 37 hash functions and message authentication
Information and network security 37 hash functions and message authentication
Vaibhav Khanna
 
Information and network security 35 the chinese remainder theorem
Information and network security 35 the chinese remainder theoremInformation and network security 35 the chinese remainder theorem
Information and network security 35 the chinese remainder theorem
Vaibhav Khanna
 
Information and network security 34 primality
Information and network security 34 primalityInformation and network security 34 primality
Information and network security 34 primality
Vaibhav Khanna
 
Information and network security 33 rsa algorithm
Information and network security 33 rsa algorithmInformation and network security 33 rsa algorithm
Information and network security 33 rsa algorithm
Vaibhav Khanna
 
Information and network security 32 principles of public key cryptosystems
Information and network security 32 principles of public key cryptosystemsInformation and network security 32 principles of public key cryptosystems
Information and network security 32 principles of public key cryptosystems
Vaibhav Khanna
 
Information and network security 31 public key cryptography
Information and network security 31 public key cryptographyInformation and network security 31 public key cryptography
Information and network security 31 public key cryptography
Vaibhav Khanna
 
Information and network security 30 random numbers
Information and network security 30 random numbersInformation and network security 30 random numbers
Information and network security 30 random numbers
Vaibhav Khanna
 
Information and network security 29 international data encryption algorithm
Information and network security 29 international data encryption algorithmInformation and network security 29 international data encryption algorithm
Information and network security 29 international data encryption algorithm
Vaibhav Khanna
 
Information and network security 28 blowfish
Information and network security 28 blowfishInformation and network security 28 blowfish
Information and network security 28 blowfish
Vaibhav Khanna
 
Information and network security 27 triple des
Information and network security 27 triple desInformation and network security 27 triple des
Information and network security 27 triple des
Vaibhav Khanna
 
Ad

Recently uploaded (20)

Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
BradBedford3
 
Agile Software Engineering Methodologies
Agile Software Engineering MethodologiesAgile Software Engineering Methodologies
Agile Software Engineering Methodologies
Gaurav Sharma
 
Generative Artificial Intelligence and its Applications
Generative Artificial Intelligence and its ApplicationsGenerative Artificial Intelligence and its Applications
Generative Artificial Intelligence and its Applications
SandeepKS52
 
Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3
Gaurav Sharma
 
Artificial Intelligence Applications Across Industries
Artificial Intelligence Applications Across IndustriesArtificial Intelligence Applications Across Industries
Artificial Intelligence Applications Across Industries
SandeepKS52
 
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink TemplateeeeeeeeeeeeeeeeeeeeeeeeeeNeuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
alexandernoetzold
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free DownloadWondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines OperationsHow Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Plooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your wayPlooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your way
Plooma
 
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The SequelMarketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
BradBedford3
 
How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0
Anchore
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native BarcelonaOpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Leveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer IntentsLeveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer Intents
Keheliya Gallaba
 
Key AI Technologies Used by Indian Artificial Intelligence Companies
Key AI Technologies Used by Indian Artificial Intelligence CompaniesKey AI Technologies Used by Indian Artificial Intelligence Companies
Key AI Technologies Used by Indian Artificial Intelligence Companies
Mypcot Infotech
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlowDevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdfTop 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Trackobit
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FMEIntegrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
Maintaining + Optimizing Database Health: Vendors, Orchestrations, Enrichment...
BradBedford3
 
Agile Software Engineering Methodologies
Agile Software Engineering MethodologiesAgile Software Engineering Methodologies
Agile Software Engineering Methodologies
Gaurav Sharma
 
Generative Artificial Intelligence and its Applications
Generative Artificial Intelligence and its ApplicationsGenerative Artificial Intelligence and its Applications
Generative Artificial Intelligence and its Applications
SandeepKS52
 
Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3Software Engineering Process, Notation & Tools Introduction - Part 3
Software Engineering Process, Notation & Tools Introduction - Part 3
Gaurav Sharma
 
Artificial Intelligence Applications Across Industries
Artificial Intelligence Applications Across IndustriesArtificial Intelligence Applications Across Industries
Artificial Intelligence Applications Across Industries
SandeepKS52
 
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink TemplateeeeeeeeeeeeeeeeeeeeeeeeeeNeuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
Neuralink Templateeeeeeeeeeeeeeeeeeeeeeeeee
alexandernoetzold
 
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free DownloadWondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Wondershare PDFelement Pro 11.4.20.3548 Crack Free Download
Puppy jhon
 
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps CyclesFrom Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
From Chaos to Clarity - Designing (AI-Ready) APIs with APIOps Cycles
Marjukka Niinioja
 
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
How Insurance Policy Administration Streamlines Policy Lifecycle for Agile Op...
Insurance Tech Services
 
How Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines OperationsHow Insurance Policy Management Software Streamlines Operations
How Insurance Policy Management Software Streamlines Operations
Insurance Tech Services
 
Plooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your wayPlooma is a writing platform to plan, write, and shape books your way
Plooma is a writing platform to plan, write, and shape books your way
Plooma
 
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The SequelMarketo & Dynamics can be Most Excellent to Each Other – The Sequel
Marketo & Dynamics can be Most Excellent to Each Other – The Sequel
BradBedford3
 
How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0How the US Navy Approaches DevSecOps with Raise 2.0
How the US Navy Approaches DevSecOps with Raise 2.0
Anchore
 
OpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native BarcelonaOpenTelemetry 101 Cloud Native Barcelona
OpenTelemetry 101 Cloud Native Barcelona
Imma Valls Bernaus
 
Leveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer IntentsLeveraging Foundation Models to Infer Intents
Leveraging Foundation Models to Infer Intents
Keheliya Gallaba
 
Key AI Technologies Used by Indian Artificial Intelligence Companies
Key AI Technologies Used by Indian Artificial Intelligence CompaniesKey AI Technologies Used by Indian Artificial Intelligence Companies
Key AI Technologies Used by Indian Artificial Intelligence Companies
Mypcot Infotech
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlowDevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdfTop 11 Fleet Management Software Providers in 2025 (2).pdf
Top 11 Fleet Management Software Providers in 2025 (2).pdf
Trackobit
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FMEIntegrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 

Object oriented programming 7 first steps in oop using c++

  • 1. Object Oriented Programming: 7 First Steps in OOP using C++ Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2. 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. • It is possible to have multiple instances of an object to co-exist without any interference.
  • 3. Benefits of OOP • It is possible to map object in the problem domain to those in the program. • It is easy to partition the work in a project based on objects. • The data-centered design approach enables us to capture more detail of a model can implemental form. • Object-oriented system can be easily upgraded from small to large system. • Message passing techniques for communication between objects makes to interface descriptions with external systems much simpler. • Software complexity can be easily managed.
  • 4. Application of OOP • Real-time system • Simulation and modeling • Object-oriented data bases • Hypertext, Hypermedia, and expert system • AI and expert systems • Neural networks and parallel programming • Decision support and office automation systems • CIM/CAM/CAD systems
  • 5. Introduction of C++ • C++ is an object-oriented programming language. • It was developed by Bjarne Stroustrup at AT&T Bell Laboratories in Murray Hill, New Jersey, USA, in the early 1980’s. • Stroustrup, an admirer of Simula67 and a strong supporter of C, wanted to combine the best of both the languages and create a more powerful language that could support object-oriented programming features and still retain the power and elegance of C. • The result was C++. Therefore, C++ is an extension of C with a major addition of the class construct feature of Simula67. • Since the class was a major addition to the original C language, Stroustrup initially called the new language ‘C with classes’. • However, later in 1983, the name was changed to C++. The idea of C++ comes from the C increment operator ++, thereby suggesting that C++ is an augmented version of C.
  • 6. Introduction of C++ • The most important facilities that C++ adds on to C are – classes, inheritance, – function overloading and – operator overloading. – These features enable creating of abstract data types, – inherit properties from existing data types and support polymorphism, thereby making C++ a truly object-oriented language.
  • 7. Printing A String in C++ • #include<iostream> • Using namespace std; • int main() • { • cout<< “c++ is a very powerful Object Oriented Programming Language n” ; • return 0; • }
  • 8. Program feature • Like C, the C++ program is a collection of function. • The above example contain only one function main(). As usual execution begins at main(). • Every C++ program must have a main(). • C++ is a free form language. • With a few exception, the compiler ignore carriage return and white spaces. • Like C, the C++ statements terminate with semicolons.
  • 9. Comments • C++ comment symbol // (double slash) is used for single line comments • Comment start with a double slash symbol and terminate at the end of the line. • A comment may start anywhere in the line, and whatever follows till the end of the line is ignored. (Note that there is no closing symbol) • 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 • */
  • 10. Output operator • cout<< “c++ is a very powerful Object Oriented Programming Language n” ; • Causes the string in quotation marks to be displayed on the screen. • This statement introduces two new C++ features, cout and <<. • The identifier cout (pronounced as C out) is a predefined object that represents the standard output stream in C++. • Here, the standard output stream represents the screen. • The operator << is called the insertion (or put to) operator
  • 11. The iostream File • We have used the following #include directive in the program: • #include <iostream> • The #include directive instructs the compiler to include the contents of the file enclosed within angular brackets into the source file.
  • 12. Namespace • 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. For using the identifier defined in the namespace scope we must include the using directive, like – Using namespace std; • Here, std is the namespace where ANSI C++ standard class libraries are defined. • All ANSI C++ programs must include this directive. • This will bring all the identifiers defined in std to the current global scope. • Using and namespace are the new keyword of C++.
  • 13. Return Type of main() • In C++, main () returns an integer value to the operating system. • Therefore, every main () in C++ should end with a return (0) statement; otherwise a warning an error might occur. • Since main () returns an integer type for main () is explicitly specified as int. • Note that the default return type for all function in C++ is int.
  • 14. Assignment • Discuss the benefits and applications of object oriented programming • Write a C++ program to print a string “Hello World” on the console output. Briefly Explain the elements of the program.