Wednesday 11 March 2015

bca2030 smu bca Winter 2014 IInd sem assignment

Winter 2014, ASSIGNMENT
PROGRAM – BCA (REVISED FALL 2012)
SEMESTER - 2
SUBJECT CODE & NAME - BCA2030- OBJECT ORIENTED PROGRAMMING – C++
CREDIT – 4 BK ID - B1641, MAX. MARKS - 60
Get fully solved assignment. Buy online from website
online store
or
plz drop a mail with your sub code
we will revert you within 2-3 hour or immediate
Charges rs 125/subject and rs 625/semester only.
if urgent then call us on 08791490301, 08273413412
Q. No.1 Differentiate between Classes and Objects. Write an example program to represent a class and its object. 4+6= 10
Answer:
Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.

Q2. Differentiate between While and Do-While loop.
Answer:
Tested first and then the statements are executed if the condition turns out to be true.
In do while 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.
2. A do while is used for a block of code that must be executed at least once.
These situations tend to be relatively rare, thus the simple while is more commonly used.
3. A do while loop runs at least once even though the the condition given is false
while loop do not run in case the condition given is false
4. In a while loop the condition is first tested and if it returns true then it goes in the loop
In a do-while loop the condition is tested at the last.
5. While loop is entry control loop
where as do while is exit control loop.

Q3. Differentiate between Constructors and Destructors.
Answer: Constructor:

Q4. What are the advantages of Polymorphism? How it can be implemented? 5+5=10
Answer: Advantages
·         Code is simpler to write (and read)
·         Uniform interface for clients, i.e., type specific details only in class code, not in the client code

Q5. Write a program in C++ to calculate the area of the circle when radius is given from the keyboard.
Answer:
#include <iostream.h>

Q6. Write a program in C++ to demonstrate the use of constructors.
Answer:
#include<iostream.h>
#include<conio.h>


Get fully solved assignment. Buy online from website
online store
or
plz drop a mail with your sub code
we will revert you within 2-3 hour or immediate
Charges rs 125/subject and rs 625/semester only.

if urgent then call us on 08791490301, 08273413412

No comments:

Post a Comment