SlideShare a Scribd company logo
1 of 3
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

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 programmingsmumbahelp
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programmingsmumbahelp
 
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsMichael Heron
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructorsNilesh Dalvi
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingumairrajpoot6
 
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 conceptsMaryo Manjaruni
 
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019ARVIND 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 2019ARVIND 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 2019ARVIND 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 PatternsSergey 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 MelayiMuhammed Thanveer M
 

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)
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Bridge Pattern
Bridge PatternBridge Pattern
Bridge Pattern
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
 
Bca5020 visual programming
Bca5020  visual programmingBca5020  visual programming
Bca5020 visual programming
 
Oops in vb
Oops in vbOops in vb
Oops in vb
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Classes and objects
Classes and objectsClasses and objects
Classes and objects
 
PATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design PatternsPATTERNS04 - Structural Design Patterns
PATTERNS04 - Structural Design Patterns
 
Bridge pattern
Bridge patternBridge pattern
Bridge pattern
 
Constructors and destructors
Constructors and destructorsConstructors and destructors
Constructors and destructors
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
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
 
Rdbms class test ii sep 2019
Rdbms class test  ii sep 2019Rdbms class test  ii sep 2019
Rdbms class test ii sep 2019
 
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
 
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
 
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
 
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
 
Introduction to odbms
Introduction to odbmsIntroduction to odbms
Introduction to odbms
 

Similar to Bca2030 object oriented programming – c++

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 languageGeorges Abboudeh
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorialsakreyi
 
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 patternchetankane
 
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.pdfHouseMusica
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityShubham Narkhede
 
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.docxdanhaley45372
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.pptTigistTilahun1
 
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 semsmumbahelp
 
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 modulesDurgesh Singh
 
5 Design Patterns Explained
5 Design Patterns Explained5 Design Patterns Explained
5 Design Patterns ExplainedPrabhjit Singh
 
Design pattern and their application
Design pattern and their applicationDesign pattern and their application
Design pattern and their applicationHiệp Tiến
 
Intro to iOS Development • Made by Many
Intro to iOS Development • Made by ManyIntro to iOS Development • Made by Many
Intro to iOS Development • Made by Manykenatmxm
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++Amresh Raj
 

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
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
 
01 objective-c session 1
01  objective-c session 101  objective-c session 1
01 objective-c session 1
 
C++ classes tutorials
C++ classes tutorialsC++ classes tutorials
C++ classes tutorials
 
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
 
I assignmnt(oops)
I assignmnt(oops)I assignmnt(oops)
I assignmnt(oops)
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
 
Design Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur UniversityDesign Pattern Notes: Nagpur University
Design Pattern Notes: Nagpur University
 
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...
 
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
 
02 objective-c session 2
02  objective-c session 202  objective-c session 2
02 objective-c session 2
 
Chapter 1- Introduction.ppt
Chapter 1- Introduction.pptChapter 1- Introduction.ppt
Chapter 1- Introduction.ppt
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
 
Unit 5.ppt
Unit 5.pptUnit 5.ppt
Unit 5.ppt
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
 
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
 
5 Design Patterns Explained
5 Design Patterns Explained5 Design Patterns Explained
5 Design Patterns Explained
 
Design pattern and their application
Design pattern and their applicationDesign pattern and their application
Design pattern and their application
 
Intro to iOS Development • Made by Many
Intro to iOS Development • Made by ManyIntro to iOS Development • Made by Many
Intro to iOS Development • Made by Many
 
Interoduction to c++
Interoduction to c++Interoduction to c++
Interoduction to c++
 

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