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
|
BCA (Revised
Fall 2012)
|
SEMESTER
|
2
|
SUBJECT CODE
& NAME
|
BCA2030- 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
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.
By definition, pass by value
means you are making a copy in memory of the actual parameter's value that is
passed in, a copy of the contents of the actual parameter. Use pass by value
when when you are only "using" the parameter for some computation,
not changing it for the client program.
In pass by reference (also called
pass by
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.
syntax of constructor:
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-oriented design seems flippant: you create another type of object. For
the storage problem, the new type of object holds other objects, or pointers to
objects. Of course, you can do the same thing with an array, but there’s more.
This new type of object, which is typically referred to in C++ as a container
(also called a collection in some languages), will expand itself whenever
necessary to accommodate
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:
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.