Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call
us at : 08263069601
(SPRING 2016) 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.
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 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 are some anomalies as well e.g. Serialization.
2) Most important difference between class and
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 are some anomalies as well e.g. Serialization.
2) Most important difference between class and
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
types to behave much like the fundamental primitive data types. Operator
overloading is helpful in cases where the operators used for certain types
provide semantics related to the domain context and syntactic support as found
in the programming
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
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.