OBJECT ORIENTED PROGRAMMING Questions Bank 2014

Anna University, Chennai

Anna_University,_Chennai_logo

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING III YEAR B.E-EEE

OBJECT ORIENTED PROGRAMMING QUESTION BANK

UNIT-I PART-A

1. Define Object and class.

2. Distinguish between procedural languages and object oriented languages.

3. What is encapsulation?

4. What is meant by message passing?

5. What are the advantages of Object oriented language?

6. Write the benefits of OOPS.

7. Give the applications of C++ programming.

8. Define abstract class.

9. What is dynamic binding?

10. What is meant by public and private member functions?

11.Sketch the structure of C++ program.

12.Define classes and objects.

13. Define parameterized constructor.

14. What is meant by member functions?

15. What is meant by data abstraction and data encapsulation?

16. Define polymorphism?

17. Write the syntax for constructor and destructor.

18. Write the characteristics of constructor functions.

19. What is constructor?

20. Define constructors with general syntax.

PART-B

1. What are the advantages and applications of using OOPS?

2. Explain the basic concepts of object-oriented programming.

3. Elaborate the following terms: class and object with an example.

4. Explain in detail about structure of C++ with an example?

5. Explain in detail about “Constructor and Destructor”.

6. Write a C++ program to construct student mark list for three subjects. Write the program to display name, rollno, marks, avg and total. Use class

and objects.


UNIT-II PART-A

1. Define operator overloading.

2. Define: function overloading.

3. Write the syntax for invoking the friend functions?

4. What are all the types of type conversions?

5. What is the use of scope resolution operator?

6. What is meant by friend function?

7. Difference between Operator overloading and function overloading.

8. What is the use of defining Constructor in the program?

9. Difference between constructor and destructor?

10. Define the term: virtual function.

11. Define Template.

12. Difference between class template and function template.

13. Write the syntax for unary operator overloading?

14. What is meant by Function Template?

15. Write the syntax for invoking the unary and binary operator?

16. What is multipath inheritance?

17. What is meant by reusability?

18.”A derived class with only one base class” is called?

19. What is meant by runtime polymorphism?

PART-B

1. Explain in detail about Operator Overloading with an example?

2. Write a C++program for function overloading using friend function?

3. Explain in detail about type conversions and its three cases.

4. Write the rules for overloading the operators.

5. Write a C++ program for Function Template?

6. Describe briefly about the virtual functions with example.

7. What are the types of inheritance? Explain.

8. Explain the following:

a) Runtime polymorphism

b) Class template


UNIT III PART-A

1. What is logical error?

2. Define Exception Handling.

3. What are the types of Error?

4. Define Terminate functions.

5. List some of the Exceptions.

6. Define try and catch.

7. Name some of the Standard Library Exceptions.

8. Define ios::in and ios::out?

9. What is meant by namespaces?

10. Define setf() and unsetf().

11. Define file.

12. What is meant by STL?

13. Name some of the file modes?

14.Define string objects.

15.What are input and output streams?

16.Define Manipulators.

17.What roles does the iomanip file play?

18.Define ios::beg and ios::end.

19.Write the syntax for file open and close?

PART-B

1. Explain in detail about Exception Handling mechanism in C++?

2. Write a brief note on try-catch-throw exception with a neat sketch?

3. Write in detailed about formatted I/O operations in C++?

4. Explain the following:

a. file error handling functions: eof () and fail()

b. namespaces

5. Explain the hierarchy of file stream classes?

6. Name some of the operators for string objects. Write a program for creating string objects.

7. What is Standard template library? State the categories of containers

and explain.


UNIT-IV PART-A

1. What are the features of Java?

2. What is the interpreter for byte code?

3. Define byte code?

4. Define JVM.

5. “Java is platform independent programs”. Why?

6. Write a simple java program.

7. Justify Java is case sensitive or not?

8. “Declare more than one public class in the same file in java programming”? Justify your answers?

9. Create a java program with a class and object.

10. Illustrate the syntax of an array in java?

11.Write the syntax to declare strings in java?

12. What are features that differ from C++ and java?

13. What are the types of comments in javadoc?

14. What is a documentation comment?

15.Give some of the javadoc tags?

PART-B

1. Explain the features of java. Java is platform independent programs”. Why?

2. Write a program to declare and create a class and object in java. How to implement a one dimensional array with an example?

3. Construct the pictorial representation of java virtual machine.

4. Mention the types of comments in javadoc? Explain with a program.

5. a. Write the syntax to create a string with no characters and with characters in java?

b. what is a package? Explain its syntax with some of the import packages.

6. a. Give some of the javadoc tags?

b. Say whether the following declarations are equivalent or not?

int a1[]=new int[3];

int [] a2=new int[3];


UNIT-V PART-A

1. Write a simple program for interface?

2. What is the difference between character stream and Byte streams?

3. Name some of java I/O classes.

4. Define: DataInputStream and InputStreamReader.

5. Define: DataOutputStream and OutputStreamReader.

6. Define: extends Thread.

7. What is the use of Runnable interface?

8. Write a program for try and catch exception?

9. What is an uncaught exception with example?

10.What is the use of throws in exception?

11.Define interfaces.

12.Write the properties of interfaces?

13.Define inner classes.

14.Define: local inner classes, anonymous inner class.

PART-B

1. Write a simple java program for inheritance and explain in detail.

2. Elaborate the following terms: interfaces and inner classes in java.

3. Explain the terms related to java: Thread and its states.

4. Explain about exception handling fundamentals in java program.

5. Design a Thread program in java.

6. Explain the life cycle of thread.