Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
“
help.mbaassignments@gmail.com ”
or
Call
us at : 08263069601
(FALL 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. Write short notes on:
a) Inheritance
Answer : Inheritance:-Inheritance means using the Pre-defined Code This is
very Main Feature of OOP With the advantage of Inheritance we can use any code
that is previously created. With the help of inheritance we uses the code that
is previously defined but always Remember, We are only using that code but not
changing that code.
With the Advent of inheritance we
are able to use pre-defined code and also able to add new code. All the
pre-defined code is reside into the form of classes if we want to use that code
then we have to inherit or extend that class.
b) Polymorphism
Answer : Polymorphism is the
ability to use an operator or method in different ways. Polymorphism gives
different meanings or functions to the operators or methods. Poly, referring to
many, signifies the many uses of these operators and methods. A single method usage
or an operator functioning in many ways can be called polymorphism.
Polymorphism refers to codes, operations or objects that behave differently in
different contexts.
2. Differentiate between pass by value and pass by reference
Answer : When passing parameters,
what it is called and what happens can be confusing. It is less essential that
you call it the "correct" thing than you know exactly what is
happening. It is critical to have a good mental model, a valid memory picture
of the process.
Recall that when you call a
function, a chunk of memory called an activation record is allocated. Critical
to the discussion here is that this memory holds the formal parameter values
and function local variables.
3. Differentiate between Constructors and Destructors.
Answer : Constructor:
1. Constructor is used to
initialize the object.
2.Constructor can takes
parameters/arguments.
3.Constructor overloading is
possible means more than one constructors can be defined in the same class.
4.constructor can be used to
initialize the memory dynamically.
5.Constructor indirectly use the
new operator to initilize the objects.
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.
Polymorphism defines the
functionality of difference with a single name / interface. Different types of
actions are defined by using one 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
values. The action is common. One interface, and multiple methods is the
concept of polymorphism
5. Differentiate between Containers and Iterators
Answer : Containers and iterators
If you don’t know how many
objects you’re going to need to solve a particular problem, or how long they
will 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 solution to most problems in
object-
6. Describe the two basic exception handling models.
Answer : Exception handling is
the process of responding to the occurrence, during computation, of exceptions
– anomalous or exceptional conditions requiring special processing – often
changing the normal flow of program execution. It is provided by specialized
programming language constructs or computer hardware mechanisms.
An exception is a problem that
arises during the 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
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.