SlideShare a Scribd company logo
UNIT 1
Introducing Object-Oriented
Programming (OOP)
MCA-2 Sem
The following issued need to
be addressed to face the crisis:
 How to represent real-life entities of problems in
system design?
 How to design system with open interfaces?
 How to ensure reusability and extensibility of
modules?
 How to develop modules that are tolerant of any
changes in future?
The following issued need to be
addressed to face the crisis:
 How to improve software productivity and
decrease software cost?
 How to improve the quality of software?
 How to manage time schedules?
Software Evolution
Layers Of Computer Software
Procedure-Oriented
Programming
Organization Of Data And
Function
Characteristics of Procedure-
Oriented Programming
 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
Basic Concepts of Object Oriented
Programming
 Objects
 Classes
 Data abstraction and encapsulation
 Inheritance
 Polymorphism
 Dynamic binding
 Message passing
Object Representation
OBJECTS:
STUDENT
DATA
Name
Date-of-birth
Marks
FUNCTIONS
Total
Average
Display
………
Classes
 A class is thus a collection of objects similar types.
 For examples, Mango, Apple and orange members of
class fruit.
 Fruit Mango;
 Will create an object mango belonging to the class
fruit.
Data Abstraction and Encapsulation
 The wrapping up of data and function into a single
unit (called class) is known as encapsulation.
 The data is not accessible to the outside world, and
only those functions which are wrapped in the class
can access it.
Data Abstraction and Encapsulation
 These functions provide the interface between the
object’s data and the program.
 Abstraction refers to the act of representing essential
features without including the background details or
explanation
Inheritance
 Inheritance is the process by which objects of
one class acquired the properties of objects of
another classes.
Polymorphism
 Polymorphism means the ability to take more than on
form.
 An operation may exhibit different behavior is
different instances. The behavior depends upon the
types of data used in the operation.
Polymorphism
 The process of making an operator to exhibit different
behaviors in different instances is known as operator
overloading.
 Using a single function name to perform different
type of task is known as function overloading.
Dynamic Binding
 Dynamic binding means that the code associated with
a given procedure call is not known until the time of
the call at run time.
 It is associated with polymorphism and inheritance.
 A function call associated with a polymorphic
reference depends on the dynamic type of that
reference.
Message Passing
 An object-oriented program consists of a set of
objects that communicate with each other.
 The process of programming in an object-oriented
language, involves the following basic steps:
Message Passing
1.Creating classes that define object and their behavior,
2. Creating objects from class definitions, and
3. Establishing communication among objects.
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.
Benefits of OOP
 It is possible to have multiple instances of an object
to co-exist without any interference.
 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.
 • Software complexity can be easily managed.
Application of OOP
 Real-time system
 Simulation and modeling
 Object-oriented data bases
 Hypertext, Hypermedia, and expertext
 AI and expert systems
 Neural networks and parallel programming
 Decision support and office automation systems
 CIM/CAM/CAD systems
Difference Between C and C++
C C++
1.C is Procedural Language.
1. C++ is non Procedural i.e Object
oriented Language.
2. No virtual Functions are present
in C
2. The concept of virtual Functions
are used in C++.
3. In C, Polymorphism is not
possible.
3. The concept of polymorphism is
used in C++.
Polymorphism is the most
Important Feature of OOPS.
4. Operator overloading is not
possible in C.
4. Operator overloading is one of
the greatest Feature of C++.
5. Top down approach is used in
Program Design.
5. Bottom up approach adopted in
Program Design.
6. No namespace Feature is present
in C Language.
6. Namespace Feature is present in
C++ foravoiding Name collision.
C C++
1.C is Procedural Language.
1. C++ is non Procedural i.e Object
oriented Language.
2. No virtual Functions are present
in C
2. The concept of virtual Functions
are used in C++.
3. In C, Polymorphism is not
possible.
3. The concept of polymorphism is
used in C++.
Polymorphism is the most
Important Feature of OOPS.
4. Operator overloading is not
possible in C.
4. Operator overloading is one of
the greatest Feature of C++.
5. Top down approach is used in
Program Design.
5. Bottom up approach adopted in
Program Design.
6. No namespace Feature is present
in C Language.
6. Namespace Feature is present in
C++ foravoiding Name collision.
Difference Between C and C++
C C++
7. Multiple Declaration of global 
variables are allowed.
7. Multiple Declaration of global 
varioables are not allowed.
•8. In C 
•scanf() Function used for Input.
•printf() Function used for output.
•8. In C++
Cin>> Function used for Input.
•Cout<< Function used for output.
9. Mapping between Data and 
Function is difficult and 
complicated.
9. Mapping between Data and 
Function can be used using 
"Objects"
10. In C, we can call main() 
Function through other Functions
10. In C++, we cannot call main() 
Function through other functions.
11. C requires all the variables to 
be defined at the starting of a 
scope.
11. C++ allows the declaration of 
variable anywhere in the scope i.e 
at time of its Firstuse.
12. No inheritance is possible in C. 12. Inheritance is possible in C++
C++ Keywords
asm
Insert  an  assembly 
instruction
auto declare a local variable
bool declare a boolean variable
break break out of a loop
case part of a switch statement
catch handles thrown exceptions
char declare a character variable
class declare a class
const declare immutable data
const_cast cast from const variables
continue bypass iterations of a loop
C++ Keywords
default
default handler in a case
 statement
delete free memory
do looping construct
double
declare a double precision 
floating-point variable
dynamic_cast perform runtime casts
else
alternate case for an if
 statement
enum create enumeration types
explicit
only use constructors when 
they exactly match
extern
tell the compiler about variables 
Header file in C++
<cstdlib>
General  purpose  utilities: 
program control, 
dynamic memory allocation, 
random numbers, sort and search
<csignal> Functions and macro constants for sign
<csetjmp> Macro (and function) that saves (and ju
<cstdarg> Handling of variable length argument l
<typeinfo> Runtime type information utilities
<typeindex> (since C++11) std::type_index
<type_traits> (since C++11) Compile-time type information
Header file in C++
<bitset> std::bitset class template
<functional>
Function objects,  designed  for 
use  with  the 
standard algorithms
<utility> Various utility components
<ctime> C-style time/date utilites
<chrono> (since C++11) C++ time utilites
<cstddef>
typedefs  for  types  such  as 
size_t, NULL and others
<initializer_list> (since  C+
+11)
std::initializer_list class 
template
<tuple> (since C++11) std::tuple class template
Comment in C++
int c;
/** 
* compares (XOR) two Types 
* return boolean result
 */
 bool compare(Type l, Type r);
Variables in C++
Charater type
Character types char
char16_t
Not smaller than char. 
At least 16 bits.
char32_t
Not smaller 
than char16_t. At least 
32 bits.
wchar_t
Can represent the largest 
supported character set.
Integer types (signed) signed char
signed short int
Not smaller than char. 
At least 16 bits.
signed int
Not smaller than short. 
At least 16 bits.
signed long int
Not smaller than int. At 
least 32 bits.
Reference Variables in C++
The declaration of the form:
<Type> & <Name> 
where <Type> is  type and <Name> isan identifier
 whose type is reference to <Type>.
Reference Variables in C++
Examples:
int A = 5; 
int& rA = A; 
extern int& rB; 
int& foo (); 
void bar (int& rP); 
class MyClass { int& m_b; /* ... */ }; 
int funcX() { return 42 ; }; int (&xFunc)() = funcX; 
const int& ref = 65; 
Bool Data Type
 The  Boolean data type is  used  to declare a 
variablewhose  value  will  be  set  as  true  (1)  or  false 
(0). 
 To  declare  such  a  value,  you  use  the bool keyword. 
The variable can then be initialized with the starting 
value. 
Bool Data Type
 A Boolean constant is used to check the state 
of a variable, an expression, or a function, as 
true or false.
 Example:
 boolGotThePassingGrade=true;

Importance of function prototyping in
C++.
#include <stdio.h>
int fac(int n); /* Prototype */
int main(void) { /* Calling function */
printf("%dn", fac()); /* ERROR: fac is missing an
argument! */
return 0; }
int fac(int n) { /* Called function */
if (n == 0)
return 1;
else
return n * fac(n - 1); }
Function Overloading
 Function overloading means two or more
functions can have the same name but either the
number of arguments or the data type of
arguments has to be different.
Function Overloading
#include <iostream>
int volume(int s)
{
return s*s*s;
}
double volume(double r, int h)
{
return 3.14*r*r*static_cast<double>(h);
}
Function Overloading
long volume(long l, int b, int h)
{
return l*b*h;
}
int main()
{
std::cout << volume(10);
std::cout << volume(2.5, 8);
std::cout<<volume(100,75,15);
Default Argumernt
 the programmer to specify default arguments that
always have a value, even if one is not specified when
calling the function.
 For example, in the following function declaration:
int my_func(int a, int b, int c=12);
result = my_func(1, 2, 3);
result = my_func(1, 2);
Inline Function
#include <iostream>
using namespace std;
inline void hello()
{
cout<<"hello";
}
int main() {
hello(); //Call it like a normal function... cin.get();
}
Scope Resolution Operator
#include <iostream>
using namespace std;
char c = 'a';
int main()
{
char c = 'b';
cout << "Local c: " << c << "n";
cout << "Global c: " << ::c << "n";
return 0;
}
Acess Specifier
 There are 3 access specifiers for a class/struct/Union
in C++.
 These access specifiers define how the members of
the class can be accessed.
 Any member of a class is accessible within that
class(Inside any member function of that same class).
 Moving ahead to type of access specifiers, they are:
Acess Specifier
An Source Code Example:
class MyClass{
public: int a;
protected: int b;
private: int c; };
int main()
{
MyClass obj;
obj.a = 10;
obj.b = 20;
obj.c = 30;
Acess Specifier
• Public - The members declared as Public are
accessible from outside the Class through an object of
the class.
• Protected - The members declared as Protected are
accessible from outside the class BUT only in a class
derived from it.
• Private - These members are only accessible from
within the class. No outside Access is allowed.
REFRENCES
• Learn Programming in C++ By Anshuman
Sharma, Anurag Gupta, Dr.Hardeep Singh,
Vikram Sharma

More Related Content

What's hot

Lightweight Model-Driven Engineering
Lightweight Model-Driven EngineeringLightweight Model-Driven Engineering
Lightweight Model-Driven Engineering
Jordi Cabot
 
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
Jordi Cabot
 
Design patterns in_c_sharp
Design patterns in_c_sharpDesign patterns in_c_sharp
Design patterns in_c_sharpCao Tuan
 
From requirements to ready to run
From requirements to ready to runFrom requirements to ready to run
From requirements to ready to run
ijfcstjournal
 
Notes of java first unit
Notes of java first unitNotes of java first unit
Notes of java first unit
gowher172236
 
1 Intro Object Oriented Programming
1  Intro Object Oriented Programming1  Intro Object Oriented Programming
1 Intro Object Oriented Programming
Docent Education
 
Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...
Marco Brambilla
 
JPT : A SIMPLE JAVA-PYTHON TRANSLATOR
JPT : A SIMPLE JAVA-PYTHON TRANSLATOR JPT : A SIMPLE JAVA-PYTHON TRANSLATOR
JPT : A SIMPLE JAVA-PYTHON TRANSLATOR
caijjournal
 
Introduction to programming languages part 2
Introduction to programming languages   part 2Introduction to programming languages   part 2
Introduction to programming languages part 2
university of education,Lahore
 
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesModel-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Marco Brambilla
 
Our research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software EngineeringOur research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software Engineering
Jordi Cabot
 
programacion orientado a abjetos poo
programacion orientado a abjetos pooprogramacion orientado a abjetos poo
programacion orientado a abjetos pooRasec De La Cruz
 
Web technologies: Model Driven Engineering
Web technologies: Model Driven EngineeringWeb technologies: Model Driven Engineering
Web technologies: Model Driven EngineeringPiero Fraternali
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
Mukesh Tekwani
 
Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...
Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...
Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...
Jordi Cabot
 
Meta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsMeta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applications
Saïd Assar
 
Model-Driven Software Engineering in Practice - Chapter 10 - Managing models
Model-Driven Software Engineering in Practice - Chapter 10 - Managing modelsModel-Driven Software Engineering in Practice - Chapter 10 - Managing models
Model-Driven Software Engineering in Practice - Chapter 10 - Managing models
Jordi Cabot
 

What's hot (20)

Lightweight Model-Driven Engineering
Lightweight Model-Driven EngineeringLightweight Model-Driven Engineering
Lightweight Model-Driven Engineering
 
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
Model-Driven Software Engineering in Practice - Chapter 8 - Model-to-model tr...
 
Aq4301224227
Aq4301224227Aq4301224227
Aq4301224227
 
Design patterns in_c_sharp
Design patterns in_c_sharpDesign patterns in_c_sharp
Design patterns in_c_sharp
 
From requirements to ready to run
From requirements to ready to runFrom requirements to ready to run
From requirements to ready to run
 
Notes of java first unit
Notes of java first unitNotes of java first unit
Notes of java first unit
 
1 Intro Object Oriented Programming
1  Intro Object Oriented Programming1  Intro Object Oriented Programming
1 Intro Object Oriented Programming
 
Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...Model driven software engineering in practice book - Chapter 9 - Model to tex...
Model driven software engineering in practice book - Chapter 9 - Model to tex...
 
JPT : A SIMPLE JAVA-PYTHON TRANSLATOR
JPT : A SIMPLE JAVA-PYTHON TRANSLATOR JPT : A SIMPLE JAVA-PYTHON TRANSLATOR
JPT : A SIMPLE JAVA-PYTHON TRANSLATOR
 
Introduction to programming languages part 2
Introduction to programming languages   part 2Introduction to programming languages   part 2
Introduction to programming languages part 2
 
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE PrinciplesModel-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
Model-Driven Software Engineering in Practice - Chapter 2 - MDSE Principles
 
Programming paradigms
Programming paradigmsProgramming paradigms
Programming paradigms
 
Our research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software EngineeringOur research lines on Model-Driven Engineering and Software Engineering
Our research lines on Model-Driven Engineering and Software Engineering
 
programacion orientado a abjetos poo
programacion orientado a abjetos pooprogramacion orientado a abjetos poo
programacion orientado a abjetos poo
 
Web technologies: Model Driven Engineering
Web technologies: Model Driven EngineeringWeb technologies: Model Driven Engineering
Web technologies: Model Driven Engineering
 
Intro1
Intro1Intro1
Intro1
 
Java chapter 1
Java   chapter 1Java   chapter 1
Java chapter 1
 
Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...
Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...
Model-Driven Software Engineering in Practice - Chapter 4 - Model-Driven Arch...
 
Meta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsMeta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applications
 
Model-Driven Software Engineering in Practice - Chapter 10 - Managing models
Model-Driven Software Engineering in Practice - Chapter 10 - Managing modelsModel-Driven Software Engineering in Practice - Chapter 10 - Managing models
Model-Driven Software Engineering in Practice - Chapter 10 - Managing models
 

Viewers also liked

MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical MethodsMCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
Rai University
 
MCA_UNIT-2_Computer Oriented Numerical Statistical Methods
MCA_UNIT-2_Computer Oriented Numerical Statistical MethodsMCA_UNIT-2_Computer Oriented Numerical Statistical Methods
MCA_UNIT-2_Computer Oriented Numerical Statistical Methods
Rai University
 
Course pack unit 5
Course pack unit 5Course pack unit 5
Course pack unit 5
Rai University
 
MCA_UNIT-3_Computer Oriented Numerical Statistical Methods
MCA_UNIT-3_Computer Oriented Numerical Statistical MethodsMCA_UNIT-3_Computer Oriented Numerical Statistical Methods
MCA_UNIT-3_Computer Oriented Numerical Statistical Methods
Rai University
 
MCA_UNIT-1_Computer Oriented Numerical Statistical Methods
MCA_UNIT-1_Computer Oriented Numerical Statistical MethodsMCA_UNIT-1_Computer Oriented Numerical Statistical Methods
MCA_UNIT-1_Computer Oriented Numerical Statistical Methods
Rai University
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
NILESH UCHCHASARE
 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
Rai University
 

Viewers also liked (7)

MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical MethodsMCA_UNIT-4_Computer Oriented Numerical Statistical Methods
MCA_UNIT-4_Computer Oriented Numerical Statistical Methods
 
MCA_UNIT-2_Computer Oriented Numerical Statistical Methods
MCA_UNIT-2_Computer Oriented Numerical Statistical MethodsMCA_UNIT-2_Computer Oriented Numerical Statistical Methods
MCA_UNIT-2_Computer Oriented Numerical Statistical Methods
 
Course pack unit 5
Course pack unit 5Course pack unit 5
Course pack unit 5
 
MCA_UNIT-3_Computer Oriented Numerical Statistical Methods
MCA_UNIT-3_Computer Oriented Numerical Statistical MethodsMCA_UNIT-3_Computer Oriented Numerical Statistical Methods
MCA_UNIT-3_Computer Oriented Numerical Statistical Methods
 
MCA_UNIT-1_Computer Oriented Numerical Statistical Methods
MCA_UNIT-1_Computer Oriented Numerical Statistical MethodsMCA_UNIT-1_Computer Oriented Numerical Statistical Methods
MCA_UNIT-1_Computer Oriented Numerical Statistical Methods
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Mm unit 4point2
Mm unit 4point2Mm unit 4point2
Mm unit 4point2
 

Similar to Mca 2 sem u-1 iintroduction

Programming In C++
Programming In C++ Programming In C++
Programming In C++
shammi mehra
 
OOP ppt.pdf
OOP ppt.pdfOOP ppt.pdf
OOP ppt.pdf
ArpitaJana28
 
chapter - 1.ppt
chapter - 1.pptchapter - 1.ppt
chapter - 1.ppt
SakthiVinoth78
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
Makaha Rutendo
 
Object Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxObject Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptx
parveen837153
 
OOP.pptx
OOP.pptxOOP.pptx
OOP.pptx
kalyanibedekar
 
Principal of objected oriented programming
Principal of objected oriented programming Principal of objected oriented programming
Principal of objected oriented programming
Rokonuzzaman Rony
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
ArifaMehreen1
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
sujathavvv
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
MalarMohana
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
Pranali Chaudhari
 
INTRODUCTION TO JAVA
INTRODUCTION TO JAVAINTRODUCTION TO JAVA
INTRODUCTION TO JAVA
RAMALINGHAM KRISHNAMOORTHY
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
shashiden1
 
A Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdfA Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdf
Ann Wera
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
Praveen M Jigajinni
 
Chapter1
Chapter1Chapter1
Chapter1
jammiashok123
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
floraaluoch3
 
1 puc programming using c++
1 puc programming using c++1 puc programming using c++
1 puc programming using c++
Prof. Dr. K. Adisesha
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.ppt
citizen15
 
C++ programing lanuage
C++ programing lanuageC++ programing lanuage
C++ programing lanuage
Nimai Chand Das
 

Similar to Mca 2 sem u-1 iintroduction (20)

Programming In C++
Programming In C++ Programming In C++
Programming In C++
 
OOP ppt.pdf
OOP ppt.pdfOOP ppt.pdf
OOP ppt.pdf
 
chapter - 1.ppt
chapter - 1.pptchapter - 1.ppt
chapter - 1.ppt
 
C++ & VISUAL C++
C++ & VISUAL C++ C++ & VISUAL C++
C++ & VISUAL C++
 
Object Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptxObject Oriented Programming using C++.pptx
Object Oriented Programming using C++.pptx
 
OOP.pptx
OOP.pptxOOP.pptx
OOP.pptx
 
Principal of objected oriented programming
Principal of objected oriented programming Principal of objected oriented programming
Principal of objected oriented programming
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
 
Programming in c++
Programming in c++Programming in c++
Programming in c++
 
Object oriented concepts
Object oriented conceptsObject oriented concepts
Object oriented concepts
 
INTRODUCTION TO JAVA
INTRODUCTION TO JAVAINTRODUCTION TO JAVA
INTRODUCTION TO JAVA
 
Unit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptxUnit 1 introduction to c++.pptx
Unit 1 introduction to c++.pptx
 
A Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdfA Hand Book of Visual Basic 6.0.pdf.pdf
A Hand Book of Visual Basic 6.0.pdf.pdf
 
2 Object Oriented Programming
2 Object Oriented Programming2 Object Oriented Programming
2 Object Oriented Programming
 
Chapter1
Chapter1Chapter1
Chapter1
 
DOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in cDOC-20210303-WA0017..pptx,coding stuff in c
DOC-20210303-WA0017..pptx,coding stuff in c
 
1 puc programming using c++
1 puc programming using c++1 puc programming using c++
1 puc programming using c++
 
C++Day-1 Introduction.ppt
C++Day-1 Introduction.pptC++Day-1 Introduction.ppt
C++Day-1 Introduction.ppt
 
C++ programing lanuage
C++ programing lanuageC++ programing lanuage
C++ programing lanuage
 

More from Rai University

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
Rai University
 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
Rai University
 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
Rai University
 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
Rai University
 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
Rai University
 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
Rai University
 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
Rai University
 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
Rai University
 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
Rai University
 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
Rai University
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Rai University
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Rai University
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
Rai University
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
Rai University
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
Rai University
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
Rai University
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
Rai University
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
Rai University
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
Rai University
 
Bsc agri 2 pae u-2.4 different forms of business organizing
Bsc agri  2 pae  u-2.4  different forms of business organizingBsc agri  2 pae  u-2.4  different forms of business organizing
Bsc agri 2 pae u-2.4 different forms of business organizing
Rai University
 

More from Rai University (20)

Brochure Rai University
Brochure Rai University Brochure Rai University
Brochure Rai University
 
Mm unit 4point1
Mm unit 4point1Mm unit 4point1
Mm unit 4point1
 
Mm unit 4point3
Mm unit 4point3Mm unit 4point3
Mm unit 4point3
 
Mm unit 3point2
Mm unit 3point2Mm unit 3point2
Mm unit 3point2
 
Mm unit 3point1
Mm unit 3point1Mm unit 3point1
Mm unit 3point1
 
Mm unit 2point2
Mm unit 2point2Mm unit 2point2
Mm unit 2point2
 
Mm unit 2 point 1
Mm unit 2 point 1Mm unit 2 point 1
Mm unit 2 point 1
 
Mm unit 1point3
Mm unit 1point3Mm unit 1point3
Mm unit 1point3
 
Mm unit 1point2
Mm unit 1point2Mm unit 1point2
Mm unit 1point2
 
Mm unit 1point1
Mm unit 1point1Mm unit 1point1
Mm unit 1point1
 
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,Bdft ii, tmt, unit-iii,  dyeing & types of dyeing,
Bdft ii, tmt, unit-iii, dyeing & types of dyeing,
 
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02Bsc agri  2 pae  u-4.4 publicrevenue-presentation-130208082149-phpapp02
Bsc agri 2 pae u-4.4 publicrevenue-presentation-130208082149-phpapp02
 
Bsc agri 2 pae u-4.3 public expenditure
Bsc agri  2 pae  u-4.3 public expenditureBsc agri  2 pae  u-4.3 public expenditure
Bsc agri 2 pae u-4.3 public expenditure
 
Bsc agri 2 pae u-4.2 public finance
Bsc agri  2 pae  u-4.2 public financeBsc agri  2 pae  u-4.2 public finance
Bsc agri 2 pae u-4.2 public finance
 
Bsc agri 2 pae u-4.1 introduction
Bsc agri  2 pae  u-4.1 introductionBsc agri  2 pae  u-4.1 introduction
Bsc agri 2 pae u-4.1 introduction
 
Bsc agri 2 pae u-3.3 inflation
Bsc agri  2 pae  u-3.3  inflationBsc agri  2 pae  u-3.3  inflation
Bsc agri 2 pae u-3.3 inflation
 
Bsc agri 2 pae u-3.2 introduction to macro economics
Bsc agri  2 pae  u-3.2 introduction to macro economicsBsc agri  2 pae  u-3.2 introduction to macro economics
Bsc agri 2 pae u-3.2 introduction to macro economics
 
Bsc agri 2 pae u-3.1 marketstructure
Bsc agri  2 pae  u-3.1 marketstructureBsc agri  2 pae  u-3.1 marketstructure
Bsc agri 2 pae u-3.1 marketstructure
 
Bsc agri 2 pae u-3 perfect-competition
Bsc agri  2 pae  u-3 perfect-competitionBsc agri  2 pae  u-3 perfect-competition
Bsc agri 2 pae u-3 perfect-competition
 
Bsc agri 2 pae u-2.4 different forms of business organizing
Bsc agri  2 pae  u-2.4  different forms of business organizingBsc agri  2 pae  u-2.4  different forms of business organizing
Bsc agri 2 pae u-2.4 different forms of business organizing
 

Recently uploaded

Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 

Recently uploaded (20)

Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 

Mca 2 sem u-1 iintroduction

  • 2. The following issued need to be addressed to face the crisis:  How to represent real-life entities of problems in system design?  How to design system with open interfaces?  How to ensure reusability and extensibility of modules?  How to develop modules that are tolerant of any changes in future?
  • 3. The following issued need to be addressed to face the crisis:  How to improve software productivity and decrease software cost?  How to improve the quality of software?  How to manage time schedules?
  • 4. Software Evolution Layers Of Computer Software
  • 6. Organization Of Data And Function
  • 7. Characteristics of Procedure- Oriented Programming  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
  • 8. Basic Concepts of Object Oriented Programming  Objects  Classes  Data abstraction and encapsulation  Inheritance  Polymorphism  Dynamic binding  Message passing
  • 10. Classes  A class is thus a collection of objects similar types.  For examples, Mango, Apple and orange members of class fruit.  Fruit Mango;  Will create an object mango belonging to the class fruit.
  • 11. Data Abstraction and Encapsulation  The wrapping up of data and function into a single unit (called class) is known as encapsulation.  The data is not accessible to the outside world, and only those functions which are wrapped in the class can access it.
  • 12. Data Abstraction and Encapsulation  These functions provide the interface between the object’s data and the program.  Abstraction refers to the act of representing essential features without including the background details or explanation
  • 13. Inheritance  Inheritance is the process by which objects of one class acquired the properties of objects of another classes.
  • 14. Polymorphism  Polymorphism means the ability to take more than on form.  An operation may exhibit different behavior is different instances. The behavior depends upon the types of data used in the operation.
  • 15. Polymorphism  The process of making an operator to exhibit different behaviors in different instances is known as operator overloading.  Using a single function name to perform different type of task is known as function overloading.
  • 16. Dynamic Binding  Dynamic binding means that the code associated with a given procedure call is not known until the time of the call at run time.  It is associated with polymorphism and inheritance.  A function call associated with a polymorphic reference depends on the dynamic type of that reference.
  • 17. Message Passing  An object-oriented program consists of a set of objects that communicate with each other.  The process of programming in an object-oriented language, involves the following basic steps:
  • 18. Message Passing 1.Creating classes that define object and their behavior, 2. Creating objects from class definitions, and 3. Establishing communication among objects.
  • 19. 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.
  • 20. Benefits of OOP  It is possible to have multiple instances of an object to co-exist without any interference.  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.  • Software complexity can be easily managed.
  • 21. Application of OOP  Real-time system  Simulation and modeling  Object-oriented data bases  Hypertext, Hypermedia, and expertext  AI and expert systems  Neural networks and parallel programming  Decision support and office automation systems  CIM/CAM/CAD systems
  • 22. Difference Between C and C++ C C++ 1.C is Procedural Language. 1. C++ is non Procedural i.e Object oriented Language. 2. No virtual Functions are present in C 2. The concept of virtual Functions are used in C++. 3. In C, Polymorphism is not possible. 3. The concept of polymorphism is used in C++. Polymorphism is the most Important Feature of OOPS. 4. Operator overloading is not possible in C. 4. Operator overloading is one of the greatest Feature of C++. 5. Top down approach is used in Program Design. 5. Bottom up approach adopted in Program Design. 6. No namespace Feature is present in C Language. 6. Namespace Feature is present in C++ foravoiding Name collision. C C++ 1.C is Procedural Language. 1. C++ is non Procedural i.e Object oriented Language. 2. No virtual Functions are present in C 2. The concept of virtual Functions are used in C++. 3. In C, Polymorphism is not possible. 3. The concept of polymorphism is used in C++. Polymorphism is the most Important Feature of OOPS. 4. Operator overloading is not possible in C. 4. Operator overloading is one of the greatest Feature of C++. 5. Top down approach is used in Program Design. 5. Bottom up approach adopted in Program Design. 6. No namespace Feature is present in C Language. 6. Namespace Feature is present in C++ foravoiding Name collision.
  • 23. Difference Between C and C++ C C++ 7. Multiple Declaration of global  variables are allowed. 7. Multiple Declaration of global  varioables are not allowed. •8. In C  •scanf() Function used for Input. •printf() Function used for output. •8. In C++ Cin>> Function used for Input. •Cout<< Function used for output. 9. Mapping between Data and  Function is difficult and  complicated. 9. Mapping between Data and  Function can be used using  "Objects" 10. In C, we can call main()  Function through other Functions 10. In C++, we cannot call main()  Function through other functions. 11. C requires all the variables to  be defined at the starting of a  scope. 11. C++ allows the declaration of  variable anywhere in the scope i.e  at time of its Firstuse. 12. No inheritance is possible in C. 12. Inheritance is possible in C++
  • 24. C++ Keywords asm Insert  an  assembly  instruction auto declare a local variable bool declare a boolean variable break break out of a loop case part of a switch statement catch handles thrown exceptions char declare a character variable class declare a class const declare immutable data const_cast cast from const variables continue bypass iterations of a loop
  • 25. C++ Keywords default default handler in a case  statement delete free memory do looping construct double declare a double precision  floating-point variable dynamic_cast perform runtime casts else alternate case for an if  statement enum create enumeration types explicit only use constructors when  they exactly match extern tell the compiler about variables 
  • 26. Header file in C++ <cstdlib> General  purpose  utilities:  program control,  dynamic memory allocation,  random numbers, sort and search <csignal> Functions and macro constants for sign <csetjmp> Macro (and function) that saves (and ju <cstdarg> Handling of variable length argument l <typeinfo> Runtime type information utilities <typeindex> (since C++11) std::type_index <type_traits> (since C++11) Compile-time type information
  • 27. Header file in C++ <bitset> std::bitset class template <functional> Function objects,  designed  for  use  with  the  standard algorithms <utility> Various utility components <ctime> C-style time/date utilites <chrono> (since C++11) C++ time utilites <cstddef> typedefs  for  types  such  as  size_t, NULL and others <initializer_list> (since  C+ +11) std::initializer_list class  template <tuple> (since C++11) std::tuple class template
  • 29. Variables in C++ Charater type Character types char char16_t Not smaller than char.  At least 16 bits. char32_t Not smaller  than char16_t. At least  32 bits. wchar_t Can represent the largest  supported character set. Integer types (signed) signed char signed short int Not smaller than char.  At least 16 bits. signed int Not smaller than short.  At least 16 bits. signed long int Not smaller than int. At  least 32 bits.
  • 30. Reference Variables in C++ The declaration of the form: <Type> & <Name>  where <Type> is  type and <Name> isan identifier  whose type is reference to <Type>.
  • 31. Reference Variables in C++ Examples: int A = 5;  int& rA = A;  extern int& rB;  int& foo ();  void bar (int& rP);  class MyClass { int& m_b; /* ... */ };  int funcX() { return 42 ; }; int (&xFunc)() = funcX;  const int& ref = 65; 
  • 32. Bool Data Type  The  Boolean data type is  used  to declare a  variablewhose  value  will  be  set  as  true  (1)  or  false  (0).   To  declare  such  a  value,  you  use  the bool keyword.  The variable can then be initialized with the starting  value. 
  • 33. Bool Data Type  A Boolean constant is used to check the state  of a variable, an expression, or a function, as  true or false.  Example:  boolGotThePassingGrade=true; 
  • 34. Importance of function prototyping in C++. #include <stdio.h> int fac(int n); /* Prototype */ int main(void) { /* Calling function */ printf("%dn", fac()); /* ERROR: fac is missing an argument! */ return 0; } int fac(int n) { /* Called function */ if (n == 0) return 1; else return n * fac(n - 1); }
  • 35. Function Overloading  Function overloading means two or more functions can have the same name but either the number of arguments or the data type of arguments has to be different.
  • 36. Function Overloading #include <iostream> int volume(int s) { return s*s*s; } double volume(double r, int h) { return 3.14*r*r*static_cast<double>(h); }
  • 37. Function Overloading long volume(long l, int b, int h) { return l*b*h; } int main() { std::cout << volume(10); std::cout << volume(2.5, 8); std::cout<<volume(100,75,15);
  • 38. Default Argumernt  the programmer to specify default arguments that always have a value, even if one is not specified when calling the function.  For example, in the following function declaration: int my_func(int a, int b, int c=12); result = my_func(1, 2, 3); result = my_func(1, 2);
  • 39. Inline Function #include <iostream> using namespace std; inline void hello() { cout<<"hello"; } int main() { hello(); //Call it like a normal function... cin.get(); }
  • 40. Scope Resolution Operator #include <iostream> using namespace std; char c = 'a'; int main() { char c = 'b'; cout << "Local c: " << c << "n"; cout << "Global c: " << ::c << "n"; return 0; }
  • 41. Acess Specifier  There are 3 access specifiers for a class/struct/Union in C++.  These access specifiers define how the members of the class can be accessed.  Any member of a class is accessible within that class(Inside any member function of that same class).  Moving ahead to type of access specifiers, they are:
  • 42. Acess Specifier An Source Code Example: class MyClass{ public: int a; protected: int b; private: int c; }; int main() { MyClass obj; obj.a = 10; obj.b = 20; obj.c = 30;
  • 43. Acess Specifier • Public - The members declared as Public are accessible from outside the Class through an object of the class. • Protected - The members declared as Protected are accessible from outside the class BUT only in a class derived from it. • Private - These members are only accessible from within the class. No outside Access is allowed.
  • 44. REFRENCES • Learn Programming in C++ By Anshuman Sharma, Anurag Gupta, Dr.Hardeep Singh, Vikram Sharma