Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Object Oriented Programming System (MCA-301) : (Assignment - 1)

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 4

Object Oriented Programming System

[MCA-301]

[Assignment -1]
1. Why C++ called object oriented programming/OOP language?
2. Differentiate between C and C++?
3. What is encapsulation?
4. What is a constructor?
5. What is overloaded constructor?
6. What is a destructor?
7. What is a copy constructor?

8. Differentiate between early binding and late binding, with an example explain how late

binding can be achieved in C++.

9. With an example, explain how virtual functions are hierachical.

10. Define pure virtual functions. Write a C++ program to illustrate pure virtual functions.

11. State the important features of object oriented programming. Compare object oriented

programming with procedure oriented programming.

12. Define function overloading. Write a C++ program to define three overloaded functions to

swap two integers, swap two floats and swap two doubles.

13. List the characteristics of a constructor. Write a C++ program to define a suitable

parameterized constructor with default values for the class distance with data members feet

and inches.

[Assignment -2]

1. What is the design of singleton class?

2. What is the default access modifier for class members and member functions in a class?
3. What is the difference between a C structure and a C++ class?

4. What is abstraction or data hiding?

5. What is THIS pointer?

6. What is a static function?


7. Why THIS pointer will not be created for a static function?
8. Explain the output manipulators: setw(), setprecision() and setfill().

9. Explain the use of ifstream and ofstream classes for file input and output.

10. Explain the file operation functions in C++ to manipulate the position of file pointers in a

random access file.

11. Write a C++ program to create a class called STRING and Implement the following

operations. Display the result after every operation by overloading the operator <<.

i) STRING S1= 'VTU'

ii) STRING S2 = 'BELGAUM'

iii) STRING S3 = S1+S2 (Use copy constructor).

12. Define a class to represent a bank account. Data Members: Depositor name, Account number,

Type of account balance. Member Functions: Assign initial value, Deposit an amount,

Withdraw after checking balance, Display.

13. Write note on:

i. Parameterized constructor

ii. Copy constructor

iii. Destructor

[Assignment -3]

1. What is scope resolution operator?

2. What is an inline function in C++?


3. What is the difference between a private member and a protected member?

4. What is polymorphism?

5. What is operator overloading?

6. What is function overloading?

7. What is overriding?
8. Define exception handling. Explain the use of try, catch and throw for exception handling in

C++.

9. Write a C++ program to illustrate catching all exceptions.

10. Explain briefly the three foundational items of standard template library.

11. What is Inheritance? Explain multilevel, multiple and hierarchical inheritance with example.

12. Write a c++ program to perform the addition and subtraction of complex numbers using

operator overloading.

13. Write a c++ program to perform a student information system using multilevel inheritance.

The system should consists student personal details, academic record and extra curriculum.

[Assignment -4]

1. How can I distinguish between prefix increment and postfix increment?

2. What is a friend function?

3. What is the size of a class having one or more virtual functions?

4. What is early binding and late binding?

5. What is inheritance?

6. What is a virtual base class?

7. How can I overload global << and >> operators to work with cin, cout etc?
8. Discuss about the basic concepts of object-oriented programming.

9. Write a note on formatted console I/O operations.

10. What is polymorphism? Explain and give an example for run-time polymorphism.
11. What is inline function? Write in which situation the inline function may not work. Write a

C++ program to find the factorial of a given number using inline.

12. Write a C++ program to create a file namely “student” with two field name and age. Get any

five student information and write it in file and close it. Again display the information in the

console from the file.

13. Furnish the detail description about Classes, object and access specifier. Write a program for

maintaining employee details using classes.

[Assignment -5]

1. What is an exception?

2. What is stack unwinding operation in exception handling?

3. How is exception handling done in C++?

4. Can you write a try-catch block that will catch all type of exceptions?

5. What is namespace?

6. What is template class?

7. How does template differ from macro?

8. Explain exception handling mechanism.

9. Differentiate between function overloading and function templates, can we overload a fuction

template? Illustrate with an example.

10. Differentiate between class and structure. With an example explain the syntax for defining a

class.

11. WAP that includes a try block and a catch clause which processes the arithmetic exception

generated by division-by-zero error.

12. Explain about the memory management operators


13. Write a program to find the area of rectangle, triangle and sphere by using function
overloading.

You might also like