KEMBAR78
Unit 1 - 2 Lecture Notes Oops C++ | PDF | Business | Computers
0% found this document useful (0 votes)
67 views52 pages

Unit 1 - 2 Lecture Notes Oops C++

Uploaded by

algebra5317
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views52 pages

Unit 1 - 2 Lecture Notes Oops C++

Uploaded by

algebra5317
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Introduction:

Procedure Oriented Programming Language

3
“Object ori

creating copies of such modules on demand”.

Data is hidden and can’t be accessed by externa



ble to express the operation of addition by a single operater say ‘+’. When this is possible you
This principle of data hiding helps the programmer to build secure programs that can’t be


C ++ was early called ‘C with classes’.

/* ….*/ are still valid and more suitable for multi line comments.

The statement cout <<”Hello, world” displayed the string with in quotes on the screen. The identifier

iostream.h represents that stream. The insertion operator << also called the ‘put to’ operator directs
cout<<”sum=”<<sum<<” n”;
cout<<”sum=”<<sum<<” n”<<”average=”<<average<<” n”;


·
·
·
·
out<<”enter name”;

out<<”enter age”;

out<<” n name:”<<name;
out<<” n age:”<<age;
identifiers and can’t be used as names for the program variables or other user defi
The name can’t start with a digit.

A declared keyword can’t be used as a variable name.



can’t be modified by the program in any way.

’ n’;

<<” ”

out<<” n”;
<<” ”<<
<<” ”<<
<<” ”<<

<<” ”<<
<<” ”<<
<<” ”<<
if… else statement
’*’,

<<” ”<<
‘=’
• Outside the class definition
• Inside the class function

‘ ’

<<” ”<<
<<” ”<<

•S


<<“ ”<<
<<” ”<<

<<” ”<<

<<” ”<<
<<” ”

<<” ”

<<” ”<<
<<” ”<<
<<” ”

<<” ”<< <<” ”


Cout<<endl<<”model:”<<
<<” ”<<
<<” ”<<” ”
<<” ”

<<” ”

<<”_”

<<” ”<<
<<” ”<<” ”

”11’ ”
’ ”
<<” ”

<<” ”

<<” ”;
<<” me”

<<” ”<<e

<<” ”
<<” ”<<
<<” ”<<
<<” ”<<

<<” ”

<<” ”
<<” ”
<<” ”

<<” ”
“ ”<<

<<” ”
<<” ”
<<” 1 :add an item’’
<<” ”
<<” ”
<<” ”
<<” ”
<<” ”

<<” ”
<<” ”
<<” “

<<” ”<<
<<” ”

<<” ”<<
<<” ”

<<” ”

<<” ”

You might also like