SlideShare 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
(WINTER 2014) ASSIGNMENT
PROGRAM MCA (Revised Fall 2012)
SEMESTER 2
SUBJECT CODE & NAME MCA2030- OBJECT ORIENTED PROGRAMMING – C++
CREDIT 2
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 question is followed by evaluation scheme.
1. Differentiate between Constructors and Destructors.
Answer : Constructor:
1. Constructor is used to initialize the object.
2.Constructor can takes parameters/arguments.
3.Constructoroverloadingispossible meansmore thanone constructorscan be defined in the same
class.
4.constructor can be used to initialize the me
2. Differentiate between Classes and Objects. Write an example program to represent a class and
its object.
Answer : Class vs Object in Java
Some difference between class and object, which is totally based upon practical experience :
1) A class is what you create while coding, but object is created at runtime by your execution
environment e.g. JVM. Though you write code, which is required to create object during coding
e.g.new Student(), object is not created at that time. They are only created when you run your
program, and when runtime executes that line. Usually constructor of a class is called when an
object is created in Java, but yes there
3. Describe operator overloading. Which are the operators that cannot be overloaded?
Answer: Operator overloading is a technique by which operators used in a programming language
are implemented in user-defined types with customized logic that is based on the types of
arguments passed.
Operator overloading facilitates the specification of user-defined implementation for operations
wherein one or both operands are of user-defined class or structure type. This helps user-defined
typesto behave muchlike the fundamental primitive data types. Operator overloading is helpful in
caseswhere the operators used for certain types provide semantics related to the domain context
and syntactic support as found in
4. What are the advantages of Polymorphism? How it can be implemented?
Answer : Polymorphism is the ability to exist in different forms. OOP allows objects belonging to
different data types to respond to calls of methods of the same name, each one according to an
appropriate type-specific behavior.
Polymorphismdefinesthe functionalityof difference withasingle name / interface. Different types
of actionsare definedbyusingone entity / method, which saves the time in investing the name of
different method names. The action is determined by the common nature of the action. For
example, adding integers and floating point
5. Differentiate between Containers and Iterators
Answer : Containers and iterators
If you don’tknowhowmany objectsyou’re goingtoneedtosolve aparticular problem, or how long
theywill last, you also don’t know how to store those objects. How can you know how much space
to create? You can’t, since that information isn’t known until run time.
The solutiontomostproblemsinobject-orienteddesignseemsflippant: you create another type of
object.Forthe storage problem,the new type of object holds other objects, or pointers to objects.
Of course,youcan do the same thingwithan array, butthere’smore.Thisnew type of object,which
istypicallyreferredtoinC++ as a container(alsocalledacollectionin some languages), will expand
itself whenever necessary to accommodate everything you place inside it. So you don’t need to
know how many objects you’re going to hold in
6. Describe the two basic exception handling models.
Answer:Exception handlingisthe processof responding to the occurrence, during computation, of
exceptions –anomalousorexceptional conditionsrequiringspecial processing – often changing the
normal flowof program execution.Itisprovidedbyspecializedprogramming language constructs or
computer hardware mechanisms.
An exceptionisaproblemthatarisesduringthe execution of a program. An exception can occur for
many different reasons, including the following:
 A user has entered invalid data.
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)

Java căn bản - Chapter13
Java căn bản - Chapter13Java căn bản - Chapter13
Java căn bản - Chapter13
Vince Vo
 
OOP - Polymorphism
OOP - PolymorphismOOP - Polymorphism
OOP - Polymorphism
Mudasir Qazi
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
Githushan Gengaparam
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
FALLEE31188
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
Java Notes
Java NotesJava Notes
Java Notes
Abhishek Khune
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
Raffaele Doti
 
Bt0074
Bt0074Bt0074
Bt0074
smumbahelp
 
Bt0074 oop with java
Bt0074   oop with javaBt0074   oop with java
Bt0074 oop with java
smumbahelp
 
Mit103 object oriented programming
Mit103  object oriented programmingMit103  object oriented programming
Mit103 object oriented programming
smumbahelp
 
Learn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsLearn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & Methods
Eng Teong Cheah
 
Java(Polymorphism)
Java(Polymorphism)Java(Polymorphism)
Java(Polymorphism)
harsh kothari
 
Bt0074, oops with java
Bt0074, oops with javaBt0074, oops with java
Bt0074, oops with java
smumbahelp
 
Encapsulation C++
Encapsulation C++Encapsulation C++
Encapsulation C++
Hashim Hashim
 
Object-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism UnleashedObject-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism Unleashed
Naresh Chintalcheru
 
C# interview
C# interviewC# interview
C# interview
Thomson Reuters
 
Object oriented approach in python programming
Object oriented approach in python programmingObject oriented approach in python programming
Object oriented approach in python programming
Srinivas Narasegouda
 
Polymorphism In Java
Polymorphism In JavaPolymorphism In Java
Polymorphism In Java
Spotle.ai
 
Oops concepts
Oops conceptsOops concepts
Oops concepts
Kanan Gandhi
 
OOP in C#
OOP in C#OOP in C#
OOP in C#
DevMix
 
Java căn bản - Chapter13
Java căn bản - Chapter13Java căn bản - Chapter13
Java căn bản - Chapter13
Vince Vo
 
OOP - Polymorphism
OOP - PolymorphismOOP - Polymorphism
OOP - Polymorphism
Mudasir Qazi
 
object oriented programing lecture 1
object oriented programing lecture 1object oriented programing lecture 1
object oriented programing lecture 1
Geophery sanga
 
Bt0074 oop with java
Bt0074   oop with javaBt0074   oop with java
Bt0074 oop with java
smumbahelp
 
Mit103 object oriented programming
Mit103  object oriented programmingMit103  object oriented programming
Mit103 object oriented programming
smumbahelp
 
Learn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & MethodsLearn C# Programming - Encapsulation & Methods
Learn C# Programming - Encapsulation & Methods
Eng Teong Cheah
 
Bt0074, oops with java
Bt0074, oops with javaBt0074, oops with java
Bt0074, oops with java
smumbahelp
 
Object-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism UnleashedObject-Oriented Polymorphism Unleashed
Object-Oriented Polymorphism Unleashed
Naresh Chintalcheru
 
Object oriented approach in python programming
Object oriented approach in python programmingObject oriented approach in python programming
Object oriented approach in python programming
Srinivas Narasegouda
 
Polymorphism In Java
Polymorphism In JavaPolymorphism In Java
Polymorphism In Java
Spotle.ai
 
OOP in C#
OOP in C#OOP in C#
OOP in C#
DevMix
 

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

Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
smumbahelp
 
Bca2030 object oriented programming – c++
Bca2030   object oriented programming – c++Bca2030   object oriented programming – c++
Bca2030 object oriented programming – c++
smumbahelp
 
Delphi qa
Delphi qaDelphi qa
Delphi qa
sandy14234
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
HouseMusica
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
smumbahelp
 
Ruby Interview Questions
Ruby Interview QuestionsRuby Interview Questions
Ruby Interview Questions
Sumanth krishna
 
Mca 504 dotnet_unit3
Mca 504 dotnet_unit3Mca 504 dotnet_unit3
Mca 504 dotnet_unit3
Rai Saheb Bhanwar Singh College Nasrullaganj
 
principles of proramming language in cppg
principles of proramming language in cppgprinciples of proramming language in cppg
principles of proramming language in cppg
swatipatil963455
 
01 objective-c session 1
01  objective-c session 101  objective-c session 1
01 objective-c session 1
Amr Elghadban (AmrAngry)
 
Object Oriented Programming 02b: Classes
Object Oriented Programming 02b: ClassesObject Oriented Programming 02b: Classes
Object Oriented Programming 02b: Classes
FabianDaffa3
 
Java unit 7
Java unit 7Java unit 7
Java unit 7
Shipra Swati
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
Questpond
 
Mi0041 java and web design
Mi0041  java and web designMi0041  java and web design
Mi0041 java and web design
smumbahelp
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
Usman Mehmood
 
Mi0041 java and web design
Mi0041  java and web designMi0041  java and web design
Mi0041 java and web design
smumbahelp
 
C++ interview question
C++ interview questionC++ interview question
C++ interview question
Durgesh Tripathi
 
Mca1020 programming in c
Mca1020  programming in cMca1020  programming in c
Mca1020 programming in c
smumbahelp
 
Mi0041 java and web design
Mi0041  java and web designMi0041  java and web design
Mi0041 java and web design
Study Stuff
 
Lesson 13 object and class
Lesson 13 object and classLesson 13 object and class
Lesson 13 object and class
MLG College of Learning, Inc
 
JAVA-PPT'S.pdf
JAVA-PPT'S.pdfJAVA-PPT'S.pdf
JAVA-PPT'S.pdf
AnmolVerma363503
 
Mca2030 object oriented programming – c++
Mca2030  object oriented programming – c++Mca2030  object oriented programming – c++
Mca2030 object oriented programming – c++
smumbahelp
 
Bca2030 object oriented programming – c++
Bca2030   object oriented programming – c++Bca2030   object oriented programming – c++
Bca2030 object oriented programming – c++
smumbahelp
 
OOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdfOOP lesson1 and Variables.pdf
OOP lesson1 and Variables.pdf
HouseMusica
 
Bca winter 2013 2nd sem
Bca winter 2013 2nd semBca winter 2013 2nd sem
Bca winter 2013 2nd sem
smumbahelp
 
Ruby Interview Questions
Ruby Interview QuestionsRuby Interview Questions
Ruby Interview Questions
Sumanth krishna
 
principles of proramming language in cppg
principles of proramming language in cppgprinciples of proramming language in cppg
principles of proramming language in cppg
swatipatil963455
 
Object Oriented Programming 02b: Classes
Object Oriented Programming 02b: ClassesObject Oriented Programming 02b: Classes
Object Oriented Programming 02b: Classes
FabianDaffa3
 
OOP interview questions & answers.
OOP interview questions & answers.OOP interview questions & answers.
OOP interview questions & answers.
Questpond
 
Mi0041 java and web design
Mi0041  java and web designMi0041  java and web design
Mi0041 java and web design
smumbahelp
 
Object oriented javascript
Object oriented javascriptObject oriented javascript
Object oriented javascript
Usman Mehmood
 
Mi0041 java and web design
Mi0041  java and web designMi0041  java and web design
Mi0041 java and web design
smumbahelp
 
Mca1020 programming in c
Mca1020  programming in cMca1020  programming in c
Mca1020 programming in c
smumbahelp
 
Mi0041 java and web design
Mi0041  java and web designMi0041  java and web design
Mi0041 java and web design
Study Stuff
 

Mca2030 object oriented programming – c++

  • 1. Dear students get fully solved assignments Send your semester & Specialization name to our mail id : “ [email protected] ” or Call us at : 08263069601 (WINTER 2014) ASSIGNMENT PROGRAM MCA (Revised Fall 2012) SEMESTER 2 SUBJECT CODE & NAME MCA2030- OBJECT ORIENTED PROGRAMMING – C++ CREDIT 2 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 question is followed by evaluation scheme. 1. Differentiate between Constructors and Destructors. Answer : Constructor: 1. Constructor is used to initialize the object. 2.Constructor can takes parameters/arguments. 3.Constructoroverloadingispossible meansmore thanone constructorscan be defined in the same class. 4.constructor can be used to initialize the me 2. Differentiate between Classes and Objects. Write an example program to represent a class and its object. Answer : Class vs Object in Java Some difference between class and object, which is totally based upon practical experience : 1) A class is what you create while coding, but object is created at runtime by your execution environment e.g. JVM. Though you write code, which is required to create object during coding e.g.new Student(), object is not created at that time. They are only created when you run your program, and when runtime executes that line. Usually constructor of a class is called when an object is created in Java, but yes there
  • 2. 3. Describe operator overloading. Which are the operators that cannot be overloaded? Answer: Operator overloading is a technique by which operators used in a programming language are implemented in user-defined types with customized logic that is based on the types of arguments passed. Operator overloading facilitates the specification of user-defined implementation for operations wherein one or both operands are of user-defined class or structure type. This helps user-defined typesto behave muchlike the fundamental primitive data types. Operator overloading is helpful in caseswhere the operators used for certain types provide semantics related to the domain context and syntactic support as found in 4. What are the advantages of Polymorphism? How it can be implemented? Answer : Polymorphism is the ability to exist in different forms. OOP allows objects belonging to different data types to respond to calls of methods of the same name, each one according to an appropriate type-specific behavior. Polymorphismdefinesthe functionalityof difference withasingle name / interface. Different types of actionsare definedbyusingone entity / method, which saves the time in investing the name of different method names. The action is determined by the common nature of the action. For example, adding integers and floating point 5. Differentiate between Containers and Iterators Answer : Containers and iterators If you don’tknowhowmany objectsyou’re goingtoneedtosolve aparticular problem, or how long theywill last, you also don’t know how to store those objects. How can you know how much space to create? You can’t, since that information isn’t known until run time. The solutiontomostproblemsinobject-orienteddesignseemsflippant: you create another type of object.Forthe storage problem,the new type of object holds other objects, or pointers to objects. Of course,youcan do the same thingwithan array, butthere’smore.Thisnew type of object,which istypicallyreferredtoinC++ as a container(alsocalledacollectionin some languages), will expand itself whenever necessary to accommodate everything you place inside it. So you don’t need to know how many objects you’re going to hold in 6. Describe the two basic exception handling models. Answer:Exception handlingisthe processof responding to the occurrence, during computation, of exceptions –anomalousorexceptional conditionsrequiringspecial processing – often changing the
  • 3. normal flowof program execution.Itisprovidedbyspecializedprogramming language constructs or computer hardware mechanisms. An exceptionisaproblemthatarisesduringthe execution of a program. An exception can occur for many different reasons, including the following:  A user has entered invalid data. Dear students get fully solved assignments Send your semester & Specialization name to our mail id : “ [email protected] ” or Call us at : 08263069601