UNIT-I

Ques 1. Procedure Oriented Programming ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤?
Ans.- ¤r ¤¬ high level language ¬| ¤¬ ¤º¤ºinn n¬·|¬ r| Procedure Oriented
Programming ¬ ¬nnn problem ¬i l¬¤i¬i ¬ ª¤ - -i·i ¬ini r ;¬¬ ¬nnn
l¬¬| problem ¬i solve ¬º· ¬ l¬¤ function ¬i l·-iºi l¬¤i ¬ini r|
Procedure Oriented Programming - l¬¬| ¬i¤ ¬i ¬-¤·· ¬ºi· ¬
l¬¤ l··’ii ¬ ¬-¸r ¬i l¬ªii ¬ini r ¤r ¬-¸r ·i| Function ¬r¬in r ¬i-i·¤n Procedure
Oriented Programming Language - program si- si- function - l··i·n ºrn r|
Procedure Oriented Programming - ·i-i ¬i-i·¤n global rini r
¤r data system ¬ l¬¬| ·i| function ¬ ¬r| ·i| use l¬¤i ¬i ¬¬ni r| Procedure
Oriented Programming - function -ª¤ l«·· rini r|
Procedure oriented programming ¬ ·i- ÷ ¬ ·i- ÷ ¬ ·i- ÷ ¬ ·i- ÷ ¬ ·i- ÷
1.Cobol
2 Fortran
Procedure oriented programming ¬| - ª¤ l·’i·ini ÷ ¬| - ª¤ l·’i·ini ÷ ¬| - ª¤ l·’i·ini ÷ ¬| - ª¤ l·’i·ini ÷ ¬| - ª¤ l·’i·ini ÷
· · · · · Algorithm ¤º ¬i·iilºn rin| r|(l¬¬| ¬i¤ ¬i ¬º· ¬| process ¬i step by step
l¬ªi·i|)
z z z z z Program ¬ flow ¬i flow chart - ·’ii¤i ¬ini r|
s ¤¬ «·i s ¤¬ «·i s ¤¬ «·i s ¤¬ «·i s ¤¬ «·i program si- si- sub program - devide l¬¤i ¬ini r|
« « « « « -ª¤ l«· function rini r|
r r r r r ¬l·i¬i’i function global data ¬i share ¬ºn r|
c c c c c ;¬- data -·n¤ ª¤ ¬ system - ¬¤¬··i ºrni r|
/ / / / / ;¬- Top Down l·l·i Programming - use rin| r|
main function
function1 function 2
function 3 function 4 function 5
Structure of Procedure Oriented Programming
Diagram:-
Relation between Data & Function in Procedure Oriented Programming
Procedure Oriented Programming ¬| ¬|-i¤ ¬| ¬|-i¤ ¬| ¬|-i¤ ¬| ¬|-i¤ ¬| ¬|-i¤ ÷
· ·· ··. Programming data ¤º ¬i·iilºn ·r| «l~¬ procedure ¤º ¬i·iilºn rin| r|
z zz zz. Data system - -·in¤ni¤¸·¬ ¬¤¬··i rini r l¬¬¬ data ¬ºl·in ·r| ºrni r|
s ss ss. -ª¤ l«· function rini r l¬¬¬ l¬ programming - procedure important ri
¬ini r object ·r| |
« «« ««. Program ¤l· ¬«i ri ni ¬¬ ¬-n·i · «·i·i ¬l-· rini r|
r rr rr. Program - ·¤i data ¬i··i n¬·i--¬ ª¤ ¬ ¬l-· r|
c cc cc. Program - Error «¸«¬º ¬¬ -|¬ ¬º·i object oriented programming ¬| n¬·i
- ¬l-· r|
/ // //. ¬i-i·¤n: global data ¤¤·n rini r
s ss ss. ¬i·i’¤¬ni · ri· ¤º ·i| data, memory - -·ii· ·iºni r|
Ques 2.- Object Oriented Programming Paradigm ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ `
Ans:- OOPs ¬ l¬,in ¬ ¬nnn Data ¬i program development ¬i -ª¤ n-· -i·i ¬ini
r n·ii Data System ¬ ¬·º -·n¤ ª¤ ¬ ·r| ·i¸- ¬¬ni r| OOP ¬ ¬nnn Data ¬i
function ¬ ¬«l·in l¬¤i ¬ini r n·ii function r| data ¤º l¬¤i ¬ºni r n·ii data ¬i «irº|
·ini·ººi ,iºi ··i-·i·’i ¤lº·n· ¬ ºi¬ni r|
OOPs l·¤ n¤ Problem ¬i si- si- ¬·¤·i, l¬·r object ¬rn r,- l··i·n
¼ni r|
Organization of Data & Member Function in OOP
Object A Object B
Data Data
Function Function
Data
Function
Object c
Ques.3- OOPs ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ?
Ans:- OOPs ¬| l·’i ·ini¤ ¬| l·’i ·ini¤ ¬| l·’i ·ini¤ ¬| l·’i ·ini¤ ¬| l·’i ·ini¤ :-
(·) (·) (·) (·) (·) Programming ,Procedure ¬| «¬i¤ Data ¤º ¬l·n ºrn| r|
(z) (z) (z) (z) (z) Programm object - l··i·n ºrn r|
(s) (s) (s) (s) (s) Data structure ;¬ nºr ¬ design l¬¤ ¬in r l¬ · object ¬i ¬··|¤¬ººi ¬º
¬¬|
(«) («) («) («) («) Function, Data ¤º l¬¤i ¬ºni r|
(r) (r) (r) (r) (r) Function n·ii Data ¬i¤¬ - Data structure (class) ¬ ¬nnn define rin r|
(c) (c) (c) (c) (c) Data s¤i r¬i rini r n·ii ·r l¬¬| «ir¤ function ,iºi ¬¤¤in ·r| l¬¤i ¬i ¬¬ni
r|
(/) (/) (/) (/) (/) Object ¬i¤¬ - function ,iºi communicate ¬ºn r|
(s) (s) (s) (s) (s) ¬« ¬·i| ·i| function ¤i Data ¬i·’¤¬ ri ¬i·i ¬i ¬¬ni r|
(s) (s) (s) (s) (s) ¤r Bottum up technique ¬i use ¬ºni r|
OOPs ¬ ¬nnn l¬¬| object ¬i data ¬¬ object ¬ ¬«l·in function ¬ ,iºi r|
¬¤¤in - ¬i¤i ¬ini r |
Ques.4- Object Oriented Programming ¬ ¬ ¬ ¬ ¬ basic concept ¬i ¬-ni;¤ ¬i ¬-ni;¤ ¬i ¬-ni;¤ ¬i ¬-ni;¤ ¬i ¬-ni;¤ ?
Ans - Object Oriented Programming ¬ ¬ ¬ ¬ ¬ basic concept :- Object Oriented Pro
gramming ¬ ¬ s
l¬,in l·-· l¬lªin r|
(1) Object
(2) Class
(3) Data Abstraction AND Data Encapsulation
(4) Inheritance
(5) Polymorphism
(6) Databinding
(7) Message Passing
(1) Object :- OOPs - object ¤¬ Runtime Entity r Object ¬i user define data ·i|
¬ri ¬ini r ¬·iin ¤r user define data ¬i l·ªl¤n ¬ºn r |l¬¬| problem
¬i l·’¬·iºi n·ii ¬i-i·i· object n·ii ¬·¬ -·¤ communication ¤º l··iº ¬ºni r|
Object, data n·ii function ¬i contain ¬ºni r ;¬ data ¬i object
n·ii function ¬ -i·¤- ¬ ¬¤¤in l¬¤i ¬ini r|
l¬¬| l¬¬| l¬¬| l¬¬| l¬¬| object ¬ ¤ - ªi n|· n ºi ri n r ÷ ¬ ¤ - ªi n|· n ºi ri n r ÷ ¬ ¤ - ªi n|· n ºi ri n r ÷ ¬ ¤ - ªi n|· n ºi ri n r ÷ ¬ ¤ - ªi n|· n ºi ri n r ÷
(1) Name Of Object :- ¤-¤¬ object ¬i ¬¬¬ ·i- ¬ ,iºi ¤r¤i·i ¬ini r ¬i l¬
system - ¬l,n|¤ rini r ¬·iin ¬¬ System - ¤¬ r|
·i- ¬ ¤¬ ¬ ¬l·i¬ object ·r| ri ¬¬n r|
(2) Physical Shape :- ¤-¤¬ object declare ri· ¤º memory - ¤¬ l·l’¤n -·ii·
·iºni r| ¤r| ¬¬ object ¬i Physical shape rini r|
object ¬ ¬·º data n·ii data ¬i ¬¤¤in ¬º· rn function ºrn r|
(3) Behaviour :- ¤¬ object l¬¬ nºr ¬ communicate ¬ºni r n·ii Data ¤º l¬¤i
¬ºni r ·r ¬¬¬i behavior rini r|
(2) Class:- Class ¤¬ User define Data type r n·ii object ;¬¬i user define variable
r| Object - Data n·ii Function ·i·i rin r ¤ data n·ii function class ¬
¬·º define rin r|
Object Class type ¬ variable ¬r¬in r ¤¬ «iº class define ri ¬i· ¤º r-
¬¬¬ ¬; object «·i ¬¬n r ;¬ ¤¬iº r- ¬r ¬¬n r l¬ ¤¬ class ¬; ¬-i· ¤¬iº ¬ object
¬i ¬-¸r rin r|
For example- Fruit ¤¬ class r ¬«l¬ mango ¬¬¬i ¤¬ object r|
(3) Data Abstraction & Encapsulation :- Data n·ii function ¬i ¤¬ single unit
(class) ¬ ¬ ·º «i ·i¬º ºªi·i Data
Encapsulation ¬r¬ini r ¬·iin Data ¬i ¬¬ class ¬ «irº ·ª¤¤in ¬ ºi¬·i n·ii class
¬ «irº data ¬i ¬·¤¬··i ¬ºi·i Data Encapsulation r ;·r Data Hiding ·i| ¬rn r|
Data ¬i program - ¬|·i ¬¤¤in ¬ ºi¬·i Data Hiding ¬r¬ini r| OOPs
- Data Hiding ¤¬ -r-·¤¸ ºi l¬,i n r ¬i l¬ system ¬i ·¤i·i ¬ºl·in n·ii user ¬ l¬¤ ¬i¬i·
«·ini r|
Abstraction :- ¤r ¤¬ l¬¤i r ¬i l¬ Data ¬i l«·i ¬¬¬ Background detail ¬ user ¬i
¬¤¬··i ¬ºini r ·¸¬º ’i··i - Data Hiding ¬ l¬,in ¬i Program -
implement ¬º·i Data Abstaction ¬r¬ini r|
C++- classes, Data Abstration ¬i use ¬ºn| r
l¬¬¬ system - data ¬|·i ¤¤in ri· ¬ «¤ni r ¤¸l¬ Class Data Abstract l¬,in ¬i use
¬ºn| r ¬n ;·r Abstract Data Type ·i| ¬ri ¬ini r|
(4) Inheritance :- Inheritance ¤¬ ¤l¬¤i r l¬¬¬ ,iºi ¤¬ class ¬i object, ·¸¬º class
¬ object ¬| property ¬i ¤i·n ¬ºni r| OOPs - Inheritance ¬
¬iººi ¤r¬ ¬ ¬¤¬··i Class - l«·i l¬¬| ¤lº·n· ¬ ¬·¤ ¬l··ii¤ ¬i·| ¬i ¬¬n| r ¤¬i ¬º·
¬ l¬¤ ¤r¬ ¬ ¬¤¬··i class - ¬ ·; class n¤iº ¬| ¬in| r| n« ¤r¬ ¬ ¬¤¬··i class ¬i Base
Class -i·ii ;¬¬ «·i; n; Class ¬i Derived class ¬rn r| ;¬ class ¬ ,iºi ¬¤·|
properties ¬ ¬i ·i Base class ¬| property ¬i ·i | l ·¤ l ¤n l ¬¤i ¬i ni r |
DIAGRAM :-
Inheritance - ·r class l¬¬- ¬·¤ class inherite rin| r ·r base class
¬r¬in| r, ¬¤ºi·n diagram - ¤¬ Base class r l¬¬¬ ¬| ·i ¬·¤ class b n·ii c inherite
ri ºr| r|
¤ri b n·ii c Derive class r ¬·iin b class, class a ¬| derived class r| ·¸¬º ’i··i
- Base class Parent class ¬r¬in| r n·ii Derived class Child class ¬r¬in| r|
(5) Polymorphism :- ¤r OOPs ¬i - ¤¸ l¬,in r Polymorphism ¬ ni-¤¤ Data ¤i
Function ¬i ¤¬ ¬ ¬l·i¬ ª¤ - ¬i¤ ¬º· ¬| ·i-ni ¬ r| ;¬ l¬,in
¬ ¬nnn ¬¬n ¬¬n ¬·¬º ¬ ¬nnn ¬¬n ¬¬n ·¤·riº ¤·l’in ¬º·i r|
Polymorphism ¬ l¬,in ¬ ,iºi Object ¬ ,iºi object l·l·i··
¬inlº¬ structure ºªin r ¤ºn ¤¬ r| «ir¤ -i·¤- ¬i declare ¬ºn r|
DIAGRAM:-
(6) DataBinding :- Binding ¬i ¬·i Procedure call ¬ ¤ln ¬-nº - execute l¬¤
¬i· ·i¬ code ¬i ¬i ·· ¬ r| Data Binding ¬ -n¬« Procedure call
¬i runtime call ¬ ¬i··i r|
;¬- code ¬i Procedure call ¬ ¬··i n« n¬ ¬nin ºrni r ¬« n¬
l¬ program - ·r call run ·r| rini r|
¤r l·’i·ini Polymorphism · Inheritance ¬ nºi ¬ ¬«l·in r|
(7) Message Passing :- Object Oriented programming ¬i l·-iºi object ¬ ¬-¸r ¬
«·i rini r ¬i ¤¬ ·¸¬º ¬ ¬i·i ¬¤iº -·iil¤n ¬º ¬¬n r Object
Oriented Program - l·-·l¬lªin l·’i·ini¤ rin| r|
(1) Class ¬i l·-iºi ¬i object n·ii ¬¬¬ ·¤·riº ¬i ¤lº·iil·in ¬ºni r|
(2) Class ¬| ¤lº·ii·ii ¬ object ¬i l·-iºi|
(3) Object ¬ -·¤ ¬¤iº -·iil¤n ¬º·i|
(4) Object ¤¬ ·¸¬º ¬ ¬¸¤·i ·i¬¬º · ¤i·n ¬º¬ ¬¤iº -·iil¤n ¬º ¬¬n r|
(5) Object ¬i ¤¬ ¬·’i l¬¬| Procedure ¬i execute ¬º· ¬ l¬¤ «·i rini r l¬¬¬
¤¬ ¤·’i· ¤i ¤il¬¬º(run) rini r|
Message passing - object ¬i ·i-, ¤·’i· ¬i ·i- -i·ii ·r ¬¸¤·i l¬¬ ·i¬| ¬i·| r
’iil-¬ rin| r|
Ques 5.:-OOPs ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ `
Ans:- OOPs ¬ l·-·l¬lªin ¬i·i r ÷ ¬ l·-·l¬lªin ¬i·i r ÷ ¬ l·-·l¬lªin ¬i·i r ÷ ¬ l·-·l¬lªin ¬i·i r ÷ ¬ l·-·l¬lªin ¬i·i r ÷
(1) Programming ¬i¬i· rin| r|
(2) l¬¬| «· r¤ program - ¬’ii·i· ¬i¬i· rini r|
(3) ;¬¬ ,iºi r- ¤r¬ ¬ «·| r; class ¬i ¬¤¤in ¬; class «·i· - ¬º ¬¬n r|
l¬¬¬ ,iºi code ¬i ·irºi· (¤·ºi·l-n) ·r| rini r|
(4) Data Hiding ¬i l¬,i n Program - Data ¬i ¬ºl·in ºªini r ¬i; ·¸¬ºi Program
;¬ code ¬i ¬¤¤in ·r| ¬º ¬¬ni r|
(5) ¤¬ Class ¬ ¬; object «·i¤ ¬i ¬¬n r l¬¬¬ Message Passing ¬iº Data
hiding ¬i¬i· ri ¬ini r|
(6) l·¤ n¤ l¬¬| ¬i¤ ¬i l·l·i·· ·iini - l··i·n ¬º ¬¬n r| l¬¬¬ ¬i¤ ¬i ¬i-i·ii·
¬i¬i· ri ¬ini r|
(7) OOPs - si- si- System ¬i l-¬i¬º ¤¬ ·¤i System ¬i¬i·| ¬ «·i¤i ¬i ¬¬ni
r|
(8) Software ¬| ¬l-¬ni ¬i ¬i¬i·| ¬ manage l¬¤i ¬i ¬¬ni r|
Application of OOPs :- OOPs ¤¬ ¬’i·n -i·¤- r l¬¬¬ ¬l-¬ ¬ ¬l-¬ ¬--¤i ¤º
¬i¬i·| ¬ ¬i¤ l¬¤i ¬i ¬¬ni r|OOPs ¤¤in l¬¤ ¬i· ¬ l¬¤
l·-· -ª¤ ·i¤ r ÷
(1) User Interface ¬¬ window ¬i «·i· -|
(2) Time System n·ii Real Time System ¬i «·i· -|
(3) Object Oriented Data Base ¬ l·-iºi -|
(4) Decision Support System ¬ l·-iºi -|
(5) CAD/CAM System ¬ l·-iºi -|
(6) Hypertext n·ii hypermedia ¬ l·-iºi -|
Ques 6.:- C++ Program ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ `
Ans :- ¬i-i·¤n ¤¬ Program n|· ¬¬n ¬¬n File - ·¤·n l¬¤i ¬ini r| Class declration
¬i ¤¬ Header file - ºªii ¬ini r n·ii Member Function ¬i ¤¬ ¬·¤ File -
¤lº·iil·in l¬¤i ¬ini r| ;¬ Approch ¬ ¬iººi Programmer, Interface (class Defination)
¬i Implement detail ¬ ¬¬n ºªii ¬ini r| ¬i-i·¤n -ª¤ Program ¬i l¬ class ¬i use
¬ºni r| ¬¬ ¤¬ n|¬º| File - ºªii ¬ini r| l¬¬- ¤r¬ ¬| ·i·i File -i·ii ¬·¤ ¬i·’¤¬ File
·i| include ¬| ¬in| r|¤r Approch Client Server Model ¤º ¬i·iilºn r|
Member
Function
Class Client server model of C++
Defination
Main function
Program
Class Defination l¬¬- Member function ¬l--l¬n r| Server ¬i l·-iºi
¬ºn| r| ;¬¬ ,iºi main Program ¬i Service ¤·i· ¬| ¬in| r| l¬¬ Client ¬ri ¬ini r,
client ¬ ,iºi server ¬i ¤¤in class ¬ Public Interface ¬ ,iºi l¬¤i ¬ini r|
C++program ¬i Structure format l·-··n ri ¬¬ni r|
# include <header file1> HEADER FILE
# include <header file2>
...............
...............
class defination
main( ) //MAIN BLOCK
{
......................
. ......................
c++ Tokens/ statement
}
¬¤ºi·n structure - #include Preprocessor Directive ¬r¬ini r ¬i l¬
l¬ªi| ¬i ºr| header file ¬i compilation ¬ ·iºi· program - include ¬º· ¬ l¬¤ use ¬ºni
r |
¤-¤¬ C++program - r- ¬s input n·ii output ¬| ¬i·’¤¬ni rin| r| nil¬
user message display ¬º ¬¬ | ;· ¬·i| input output statement ¤i command ¬| defination
iostream.h header file - store rin| r ¬n l¬¬| c++program - iostream.h file ¬i
include ¬º·i ¬l··i¤ rini r|
¬n r- ¤r ¬r ¬¬n r l¬ ¤-¤¬ c++program ¬i ¤·i- statement l·-··n rini ÷
# include < iostream.h >
;¬| nºr ¬ ¤l· r- input output statement ¬ ¬¬i·i c++ ¬ ¬s ¬iº
statement ¤¤in ¬º·i r n« r- ¬«¬ ¤r¬ ¬¬¬ ¬«l·in header file ¬i program - include
¬º·i rini|
For ex. ¤l· r- c++program - Mathametical commands ¤i statement
¬i use ¬º·i ¤irn r n« r- program - math.h header file ¬i include ¬ºn|
# include < math.h >
*Class defination :- C++¤¬ Object Oriented Programming language r| ¤l· r-
program - class define ¬º·i ¤i rn r n« r- #include
statement ¬ «i· n·ii main function ¬ ¤r¬ class define ¬ºn r|
*Main Function :- ¤-¤¬ c++program - ¤¬ main function ¬l··i¤ rini r|¤-¤¬
program ¬i execution main function ¬ -·n ¤iº-·i rini r|
Main function :-
(1) ¤r ¤¬ Builtin Function r|
(2) ¤r ¬·· integer value return ¬ºni r|
(3) l¬¬| ·i| program - ¤¬ main( ) ¬l··i¤ r|
(4) Program ¬i execution r-’ii main( ) ¬ -·n ¤iº-·i rini r|
*C++ Program Structure - ¤¤·n ri· ·i¬| ¬s ¬·¤ -r-¤¤¸ºi ¤|¬ ÷ - ¤¤·n ri· ·i¬| ¬s ¬·¤ -r-¤¤¸ºi ¤|¬ ÷ - ¤¤·n ri· ·i¬| ¬s ¬·¤ -r-¤¤¸ºi ¤|¬ ÷ - ¤¤·n ri· ·i¬| ¬s ¬·¤ -r-¤¤¸ºi ¤|¬ ÷ - ¤¤·n ri· ·i¬| ¬s ¬·¤ -r-¤¤¸ºi ¤|¬ ÷
(1)Comment :- ¬·i|÷¬·i| c++program - r- ¤¬ ¬·i· ¤i ’i·· l¬ªi· ¬| ¬i·’¤¬ni
rin| r l¬·r execute ·r| l¬¤i ¬i·i r ·r comment ¬r¬in r|
Comment program - l-·¤ºi| ¬ ª¤ - -i¬¸· ºrn r ¬i l¬ program - l¬¬| Subject
¤º l-·¤ºi| ¤i ·i- l¬ªi· ¬| ¬l··ii ¤·i· ¬ºn r|
Program ¬| l¬¬ line - l¬¬ -·ii· ¤º // l¤·r ¬ni rini r ¬¬ line - ¬¬ -·ii·
¬ line¬ ¬n n¬ ¬i ¬·i| matter comment «· ¬ini r|
for example:- # include < iostream.h > // header file
(2)“;” (¬ -|¬i ¬· ¬ -|¬i ¬· ¬ -|¬i ¬· ¬ -|¬i ¬· ¬ -|¬i ¬·)
¤-¤¬ C++statement “ ; ” ¬ terminate rini r|
for example:-
cout<<“hello”;
(3){ } (openning brackets and closing brackets)
C++- ¤¤·n ri· ·i¬ function ¤i structure ¬·· { ¬ ¤iº-·i rin r ¬iº
} ¬ close rin r|
Ques. 7- C++ - l¬¬| - l¬¬| - l¬¬| - l¬¬| - l¬¬| Source File ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº Create l¬¤i ¬ini r n·ii ¬¬ l¬¤i ¬ini r n·ii ¬¬ l¬¤i ¬ini r n·ii ¬¬ l¬¤i ¬ini r n·ii ¬¬ l¬¤i ¬ini r n·ii ¬¬
l¬¬ ¤¬iº l¬¬ ¤¬iº l¬¬ ¤¬iº l¬¬ ¤¬iº l¬¬ ¤¬iº Compile ¬·i·i ¬·i·i ¬·i·i ¬·i·i ¬·i·i Link l¬¤i ¬ini r ` l¬¤i ¬ini r ` l¬¤i ¬ini r ` l¬¤i ¬ini r ` l¬¤i ¬ini r `
Ans.- C++¬i Program l¬¬| ·i| Text - Editor - n¤iº l¬¤i ¬i ¬¬ni r| ¬·irººi ¬ l¬¤
Unix - r- VI -i·ii Ed Text Editor ¬i ¬¤¤in Source ¬i n¤iº n·ii Edit ¬º· - ¬ºn
r| DOS ¤º ¬i·iilºn System - r- Edit Command ¬ ,iºi Source ¬i n¤iº ¬º ¬¬n r|
¬·i·i ;¬ Non-Document Mode - l¬¬| Word Processor System - ·i| n¤iº l¬¤i ¬i
¬¬ni r| ¬s System ¬¬ l¬ Visual C++- Integrated Development Enviorment
( IDE ) ¤·i· l¬¤i ¬ini r| C++Program ¬i Extension .cpp rini r| Unix AT & T
Version - ;¬¬i Extension .c n·ii .cc rini r|
Compiling & Linking :- ;¬¬| ¤l¬¤i Operating System ¤º l··iº ¬ºn| r| ¬s System
l·-··n r|
1. Unix AT & T
2. Turbo C++n·ii Borland C++
3. Visual C++
1. Unix AT & T :- Unix ¬ ¬nnn C++Program ¬i Run ¬º· ¬i nº|¬i ·r| r ¬i l¬ C
¬ Program ¬ l¬¤ r| Program ¬i Compile ¬º· ¬ l¬¤ C Com
-mand ¬i ¬¤¤in ¬º·i rini r| ¬·irººi ¬ l¬¤ ÷
CC Example a.c
¬« Compiler ¬ ,iºi ¤¬ Object file example a n¤iº ¬| ¬in| r| ¬i l¬
Library Function ¬ -·n r| Link ri¬º Executable File n¤iº ¬ºn| r|
2. Turbo C++ n·ii n·ii n·ii n·ii n·ii Borland C++ :- ;· ·i·i ¬ ,iºi MS Dos ¬ nrn Integrated
Program Development Enviorment ¤ ·i· l¬¤i
¬ini r| ;·- ¤¬ «·i «·i¤i Editor n·ii Menubar ¬¤¬··i rini r| l¬¬- l·l·i··i option ¬¬
l¬ File, edit, compile ¬iº Run ¬il· ¬¤¬··i rin r ¬« r- Source Code ¬i n¤iº ¬ºn r|
-i·ii Run Command ¬i ¬¤¤in ¬ºn r n« System Program ¬i ¤¬ r| Step - Compile,
Link n·ii Run ¬º ·ni r|
3. Visual C++ :- ¤r C++¬i Window ¬ ¬ nn n ¤¬i¤i ¬i· ·i¬i Mircosoft
Application Development System r| ¤r Visual Programming
Enviorment ¬¤¬··i ¬º·ini r| l¬¬- l·l·i·· Program Components ¬i Menu, buttons,
Icons n·ii ¬·¤ ¤¸· l··iilºn Methods ¬ ,iºi Select l¬¤i ¬ini r|
STEPS OF COMPILING AND LINKING :-
C++- ¤ini- ¬i compile n·ii Linking ¬º· ¬ l·-·l¬lªin ¤· (Steps) r ÷
Step 1- C++¬ Editor - ¤ini- ¬| ¬il·n (Coding) ¬ºn r|
Step 2- Editor - Source program ¬i l¬ªi· ¬ ¤’¤in Program ¬i save ¬ºn r
;¬¬ ¤’¤in Alt +F9 Key ¬i Press ¬ºn r| Alt+F9 Key ¬i use C++-
¤ini- ¬i Compile ¬º· ¬ l¬¤ ¬ºn r|
Step 3- Program ¬ Compilation ¬ ¬-¤ ¤l· ¤ini- - Error r ni ¤ Error
Debugging window - ¤·l’in rin| r| l¬¬ Line - Error rin| r ni ·r
Line No. Error ¬ ¬i·i ¤·l’in rin| r|
Step 4- ¤l· Program ¬ compilation - error ·r| r ni screen ¤º successfully
Compilation -¬¬ ¤·l’in rini r| ;¬¬ ¤’¤in .obj Extention ¬| ¬i·¬·-
¤i;¬ «·n| r|
Step 5- ¬i·¬·- ¤ini- ¬ ¤’¤in ¤r Library funcation ¬ l¬¬ rini r, ;¬ l¬l¬n
¬rn r|
Step 6- ;¬¬ ¤’¤in compiled ¤i;¬ n·ii Linked ¤i;¬ l-¬¬º Exe ¤i;¬ n¤iº ¬ºn
r|
Step 7- ;¬ Exe ¤i;¬ ¬i ¬i¬-¤- screen ¤º ·ªi· ¬ l¬¤ Ctrl +F9 Key Press
¬ºn r| ctrl +F9 Key Combination ¬i ¤¤in C++¬| ¤i;¬ ¬i execute
¬º· ¬ l¬¤ ¬ºn r|
Step 8- Dos Prompt ¤º Exe File ¬i ·i- Type ¬º¬ Enter key Press ¬º· ¬ ·i|
Exe File l¬¤il··n rin| r|
Ques.8- ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ |
List out the advantage of object oriented programming.
Ans. ¬i·¬·- ¬ilº¤·-· ¤inil-n ¬i·¬·- ¤º ¬i·iilºn ¤inil-n r| ¤i¬|¬º ¬ilº¤·-· ¤inil-n -
«· «· ¤ini-i ¬i «·i· - ¬i·| ·i¬| ¬l-¬ni¬i (complexity) ¬i ¬i·¬·- ¬ilº¤·-·
¤inil-n - ·¸º ¬º l·¤i n¤i| ¬i·¬·- ¬ilº¤·-· ¤inil-n - real life based ¬i¤-·¤ºi ¬i ¬i¬i·|
¬ «·i¤i ¬i ¬¬ni r| ¬i·¬·- ¬ilº¤·-· ¤inil-n ¬ -ª¤ ª¤ ¬ l·-·l¬lªin ¬i·i r|
·. ·. ·. ·. ·. ¬i·¬·- ¬ilº¤·-· ¤inil-n ¬i ¤¤in ¬º¬ ¤ini-ºi ¬ l¬¤ ¤inil-n ¬º·i ¬i¬i· r n·ii
¬i¤-·¤º l·¬i;·ºi ¬ l¬¤ ¤ini- l·¬i;· ¬º·i ¬i¬i· r|
z. z. z. z. z. ¤i¬|¬º ¬ilº¤·-· ¤inil-n - «· r¤ ¤ini-i - ·¤ nºii ¬i ¬i·¬º ¬’ii·i· ¬º·i ¬i¬i· ·r|
r ¬«l¬ ¬i·¬·- ¬ilº¤·-· ¤inil-n - ¤r¬ ¬ «· r¤ ¤ini- - ¬’ii·i· l¬¤ l«·i r| ·¤ nºii ¬i
¬i··i ¬i¬i· r|
s. s. s. s. s. ¬i·¬·- ¬ilº¤·-· ¤inil-n - ¤¬ class ¬ ¬·º ¤¤in l¬¤ n¤ variables ¬i ·¸¬º ¤·’i·i n·ii
class ¬ s¤i¤i ¬i ¬¬ni r| ;· variables ¬i ;¬¬ ¬«l·in ¤·’i·i ¬ -i·¤- ¬ r| ¤·¬¬ l¬¤i
¬i ¬¬ni r| ¬i·¬·- ¬ilº¤·-· ¤inil-n ¬i ¤r ¬i·i ¬-¤·n -r-·¤¸ºi r| ;¬ Data Encapsula-
tion ¬rn r|
«. «. «. «. «. ¬i·¬·- ¬ilº¤·-· ¤inil-n ¬i·¬·- ¤º ¬i·iilºn r| ;¬ ¬i·¬·- ¬ -i·¤- ¬ r| ;¬¬ ¬«l·in
¤·’i·i ¬ ,iºi Data Access l¬¤i ¬ini r| ¤¬ object ¬ ¤¬ ¬ ¬l·i¬ Instance «·i¤ ¬i ¬¬n
r, ¬i ¬i¤¬ - Interact ¬º ¬¬n r|
r. r. r. r. r. ¬i·¬·- ¬ilº¤·-· ¤inil-n - si- l¬--- ¬i «· l¬--- - ¬i¬i·| ¬ upgrade l¬¤i ¬i ¬¬ni
r |
c. c. c. c. c. ¬i·¬·- ¬ilº¤·-· ¤inil-n - Real life system ¬| complexity ¬i ¬i¬i·| ¬ ¬º¬ l¬¤i ¬i
¬¬ni r|
/. /. /. /. /. ¬i·¬·- ¬ilº¤·-· ¤inil-n - ·’ii·¬- (Inheritance) ¬ -i·¤- ¬ ¤¬ class ¬i ·i-i ¤¬ ¬
¬l·i¬ class - share ¤i Inherite ¬º ¬¬n r|
s. s. s. s. s. ¬i·¬·- ¬ilº¤·-· ¤inil-n - ¬i·¬·-i ¬ «|¤ - Communication ¬ l¬¤ Message
Passing n¬·|¬ ¬i ¤¤in l¬¤i ¬ini r|
s. s. s. s. s. ¬i·¬·- ¬ilº¤·-· ¤inil-n - Polymorphism ¬ -i·¤- ¬ ¤·’i·i ¬i l·l·i·· nº|¬i ¬ ¤¤in
l¬¤i ¬i ¬¬ni r|
UNIT-I
Ques 1. Procedure Oriented Programming ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤ ·¤i r ¬-ni;¤?
P.NO.-1-2
Ques 2.- Object Oriented Programming Paradigm ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ ` ¬i ¬-ni;¤ `
P.NO.-3
Ques.3- OOPs ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ¬| l·l·i·· l·’i·ini¬i ¬i ·ºi· ¬|l¬¤ ?
P.NO.-4
Ques.4- Object Oriented Programming ¬ ¬ ¬ ¬ ¬ basic concept ¬i ¬-ni;¤ ¬i ¬-ni;¤ ¬i ¬-ni;¤ ¬i ¬-ni;¤ ¬i ¬-ni;¤ ?
P.NO.-5-7
Ques 5.:-OOPs ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ ` ¬ ¬i·i n·ii ¬¤¤in «ni;¤ `
P.NO.-8
Ques 6.:- C++ Program ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ ` ¬| ¬º¤·i ¬-ni;¤ `
P.NO.-9-11
Ques. 7- C++ - l¬¬| - l¬¬| - l¬¬| - l¬¬| - l¬¬| Source File ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº ¬i l¬¬ ¤¬iº Create l¬¤i ¬ini r n·ii l¬¤i ¬ini r n·ii l¬¤i ¬ini r n·ii l¬¤i ¬ini r n·ii l¬¤i ¬ini r n·ii
¬¬ l¬¬ ¤¬iº ¬¬ l¬¬ ¤¬iº ¬¬ l¬¬ ¤¬iº ¬¬ l¬¬ ¤¬iº ¬¬ l¬¬ ¤¬iº Compile ¬·i·i ¬·i·i ¬·i·i ¬·i·i ¬·i·i Link l¬¤i ¬ini r ` l¬¤i ¬ini r ` l¬¤i ¬ini r ` l¬¤i ¬ini r ` l¬¤i ¬ini r `
P.NO.-12-13
Ques.8- ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ | ¬i ·¬ ·- ¬i lº¤ ·- · ¤ i n il- n ¬ ¬i·ii ¬i ¬¸ ¤|«, ¬|l¬¤ |
P.NO.-14
.

Sign up to vote on this title
UsefulNot useful