ݺߣ

ݺߣShare a Scribd company logo
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
ASSIGNMENT
PROGRAM BCA(REVISED FALL 2012)
SEMESTER 2
SUBJECT CODE & NAME BCA2030 - OBJECT ORIENTED PROGRAMMING – C++
CREDIT 4
BK ID B1641
MAX.MARKS 60
Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately
of 400 words. Each questionis followedbyevaluationscheme.
1 Differentiate between Classes and Objects. Write an example program to represent a class and its
object.
Answer: OOP (Object Oriented Programming) is a programming concept (or technique), which treats
data and functionsasobjects.
Importantto thisconceptisto understandthe difference betweenaClassandan Object.
 A class is a "blueprint" for an object, is a code template used to generate objects. It contins the
instructionsthatdefine the propertiesandmethodsthatanobjectcan use.
 Objects are elements from the script that are defined to perform the instructions written in a
class,and can use the propertiesandmethodsdefinedinthe class.
 For example,tounderstand,youcan
2 Differentiate betweenwhileanddo-While loop.
Answer: while is an ENTRY CONTROLLED LOOP while do while is an EXIT CONTROLLED LOOP. The main
feature of the do while loops is it is an exit controlled loopThis means that the statements enclosed
inside the do{} will executeirrespective of the condition.
 In while loop the condition is tested first and then statements are executed if the condition
turns out to be true. In do while loop the statements are executed for the first time and then the
conditions are tested, if the condition turns out to be true then the statements are executed
again.
 A do while isusedforablockof code that
3 Differentiate betweenConstructorsandDestructors.
Answer: The main difference is that constructor constructs the values of an object and a destructor
destructs the values created by the constructor for the object. A constructor is called when you want to
create a new instance of a class. A destructor is called when you want to free up the memory of an
object (when you delete it). A constructor constructs the value of an object. A destructor destructs the
value created by the constructor for the object. Constructor is called in the beginning of the program
and **destructoris calledatthe endingof the program.
 constructercan be overloaded
 destructorscannotbe overloaded
4 What are the advantages of Polymorphism?How can it be implemented?
Answer: Polymorphism means the ability to take more than one form. An operation may exhibit
differentbehaviorsindifferentinstances.The behaviordependsonthe datatypesusedinthe operation
Advantages of polymorphism:
- Same interface couldbe usedforcreatingmethodswithdifferentimplementations
- Reducesthe volume of workintermsof distinguishingandhandlingvariousobjects
- Supportsbuildingextensible systems
- Complete implementationcanbe replacedbyusingsame methodsignatures
}
5 Write a program in C++ to calculate the area of the circle when radius isgiven from the keyboard.
Answer:
6 Write a program in C++ to demonstrate the use of constructors.
Answer: In class-based object-oriented programming, a constructor (abbreviation: ctor) in a class is a
special type of subroutine called to create an object. It prepares the new object for use, often accepting
argumentsthatthe constructorusesto setrequiredmembervariables.
Algorithm:
STEP 1: Start the program.
STEP 2: Declare the classas Prime withdata members,
Memberfunctions.
STEP 3: Considerthe argumentconstructorPrime()withinteger
Argument.
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601

More Related Content

What's hot (20)

M.tech oops through_c++_labmanual1 (1)
M.tech oops through_c++_labmanual1 (1)M.tech oops through_c++_labmanual1 (1)
M.tech oops through_c++_labmanual1 (1)
yuvanalagadapati
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
smumbahelp
Design patterns
Design patternsDesign patterns
Design patterns
Anas Alpure
Bridge Pattern
Bridge PatternBridge Pattern
Bridge Pattern
Somenath Mukhopadhyay
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
smumbahelp
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
smumbahelp
Oops in vb
Oops in vbOops in vb
Oops in vb
Dalwin INDIA
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
Army Public School and College -Faisal
Classes and objects
Classes and objectsClasses and objects
Classes and objects
Bhushan Mulmule
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design Patterns
Michael Heron
Bridge pattern
Bridge patternBridge pattern
Bridge pattern
Shakil Ahmed
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
Nilesh Dalvi
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
umairrajpoot6
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
Maryo Manjaruni
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019
ARVIND SARDAR
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019
ARVIND SARDAR
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019
ARVIND SARDAR
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural Patterns
Sergey Aganezov
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
Muhammed Thanveer M
Introduction to odbms
Introduction to odbmsIntroduction to odbms
Introduction to odbms
ajay pashankar
M.tech oops through_c++_labmanual1 (1)
M.tech oops through_c++_labmanual1 (1)M.tech oops through_c++_labmanual1 (1)
M.tech oops through_c++_labmanual1 (1)
yuvanalagadapati
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
smumbahelp
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
smumbahelp
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
smumbahelp
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design Patterns
Michael Heron
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
Nilesh Dalvi
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
umairrajpoot6
Jedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented conceptsJedi slides 2.1 object-oriented concepts
Jedi slides 2.1 object-oriented concepts
Maryo Manjaruni
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019
ARVIND SARDAR
DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019DMS Question bank class test ii sep 2019
DMS Question bank class test ii sep 2019
ARVIND SARDAR
Question bank class test ii sep 2019
Question bank class test ii sep 2019Question bank class test ii sep 2019
Question bank class test ii sep 2019
ARVIND SARDAR
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural Patterns
Sergey Aganezov
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
Muhammed Thanveer M

Similar to Bca2030 object oriented programming – c++ (20)

Object Oriented Software Development, using c# programming language
Object Oriented Software Development, using c# programming languageObject Oriented Software Development, using c# programming language
Object Oriented Software Development, using c# programming language
Georges Abboudeh
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
Rai Saheb Bhanwar Singh College Nasrullaganj
01 objective-c session 1
01  objective-c session 101  objective-c session 1
01 objective-c session 1
Amr Elghadban (AmrAngry)
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
akreyi
Classes and objects object oriented programming
Classes and objects object oriented programmingClasses and objects object oriented programming
Classes and objects object oriented programming
areebakanwal12
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design pattern
chetankane
Object Oriented Programming (Advanced )
Object Oriented Programming   (Advanced )Object Oriented Programming   (Advanced )
Object Oriented Programming (Advanced )
ayesha420248
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
Jay Patel
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
HouseMusica
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
Shubham Narkhede
@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
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
NicheTech Com. Solutions Pvt. Ltd.
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
danhaley45372
02 objective-c session 2
02  objective-c session 202  objective-c session 2
02 objective-c session 2
Amr Elghadban (AmrAngry)
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
TigistTilahun1
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
smumbahelp
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
JITTAYASHWANTHREDDY
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
smumbahelp
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modules
Durgesh Singh
Object Oriented Software Development, using c# programming language
Object Oriented Software Development, using c# programming languageObject Oriented Software Development, using c# programming language
Object Oriented Software Development, using c# programming language
Georges Abboudeh
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
akreyi
Classes and objects object oriented programming
Classes and objects object oriented programmingClasses and objects object oriented programming
Classes and objects object oriented programming
areebakanwal12
Sofwear deasign and need of design pattern
Sofwear deasign and need of design patternSofwear deasign and need of design pattern
Sofwear deasign and need of design pattern
chetankane
Object Oriented Programming (Advanced )
Object Oriented Programming   (Advanced )Object Oriented Programming   (Advanced )
Object Oriented Programming (Advanced )
ayesha420248
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
HouseMusica
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
Shubham Narkhede
@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
OOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming languageOOPS_Lab_Manual - programs using C++ programming language
OOPS_Lab_Manual - programs using C++ programming language
PreethaV16
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
Objective of c in IOS , iOS Live Project Training Ahmedabad, MCA Live Project...
NicheTech Com. Solutions Pvt. Ltd.
Patterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docxPatterns (contd)Software Development ProcessDesign patte.docx
Patterns (contd)Software Development ProcessDesign patte.docx
danhaley45372
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
smumbahelp
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
smumbahelp
Object-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modulesObject-oriented programming (OOP) with Complete understanding modules
Object-oriented programming (OOP) with Complete understanding modules
Durgesh Singh

Bca2030 object oriented programming – c++

  • 1. Dear students get fully solved assignments Send your semester & Specialization name to our mail id “ help.mbaassignments@gmail.com ” or Call us at : 08263069601 ASSIGNMENT PROGRAM BCA(REVISED FALL 2012) SEMESTER 2 SUBJECT CODE & NAME BCA2030 - OBJECT ORIENTED PROGRAMMING – C++ CREDIT 4 BK ID B1641 MAX.MARKS 60 Note: Answer all questions. Kindly note that answers for 10 marks questions should be approximately of 400 words. Each questionis followedbyevaluationscheme. 1 Differentiate between Classes and Objects. Write an example program to represent a class and its object. Answer: OOP (Object Oriented Programming) is a programming concept (or technique), which treats data and functionsasobjects. Importantto thisconceptisto understandthe difference betweenaClassandan Object.  A class is a "blueprint" for an object, is a code template used to generate objects. It contins the instructionsthatdefine the propertiesandmethodsthatanobjectcan use.  Objects are elements from the script that are defined to perform the instructions written in a class,and can use the propertiesandmethodsdefinedinthe class.  For example,tounderstand,youcan 2 Differentiate betweenwhileanddo-While loop. Answer: while is an ENTRY CONTROLLED LOOP while do while is an EXIT CONTROLLED LOOP. The main feature of the do while loops is it is an exit controlled loopThis means that the statements enclosed inside the do{} will executeirrespective of the condition.
  • 2.  In while loop the condition is tested first and then statements are executed if the condition turns out to be true. In do while loop the statements are executed for the first time and then the conditions are tested, if the condition turns out to be true then the statements are executed again.  A do while isusedforablockof code that 3 Differentiate betweenConstructorsandDestructors. Answer: The main difference is that constructor constructs the values of an object and a destructor destructs the values created by the constructor for the object. A constructor is called when you want to create a new instance of a class. A destructor is called when you want to free up the memory of an object (when you delete it). A constructor constructs the value of an object. A destructor destructs the value created by the constructor for the object. Constructor is called in the beginning of the program and **destructoris calledatthe endingof the program.  constructercan be overloaded  destructorscannotbe overloaded 4 What are the advantages of Polymorphism?How can it be implemented? Answer: Polymorphism means the ability to take more than one form. An operation may exhibit differentbehaviorsindifferentinstances.The behaviordependsonthe datatypesusedinthe operation Advantages of polymorphism: - Same interface couldbe usedforcreatingmethodswithdifferentimplementations - Reducesthe volume of workintermsof distinguishingandhandlingvariousobjects - Supportsbuildingextensible systems - Complete implementationcanbe replacedbyusingsame methodsignatures } 5 Write a program in C++ to calculate the area of the circle when radius isgiven from the keyboard.
  • 3. Answer: 6 Write a program in C++ to demonstrate the use of constructors. Answer: In class-based object-oriented programming, a constructor (abbreviation: ctor) in a class is a special type of subroutine called to create an object. It prepares the new object for use, often accepting argumentsthatthe constructorusesto setrequiredmembervariables. Algorithm: STEP 1: Start the program. STEP 2: Declare the classas Prime withdata members, Memberfunctions. STEP 3: Considerthe argumentconstructorPrime()withinteger Argument. Dear students get fully solved assignments Send your semester & Specialization name to our mail id : “ help.mbaassignments@gmail.com ” or Call us at : 08263069601