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’’
<<” ”
<<” ”
<<” ”
<<” ”
<<” ”
<<” ”
<<” ”
<<” “
<<” ”<<
<<” ”
<<” ”<<
<<” ”
<<” ”
<<” ”