Showing posts with label OOPS. Show all posts
Showing posts with label OOPS. Show all posts

Anna University– Object Oriented Programming (OOPs)–Nov / Dec 2011 Question Paper

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2011.


Common to B.E. Computer Science and Engineering I B.Tech. — Information Technology
Third Semester
141303 - OBJECT ORIENTED PROGRAMMING .
(Regulation 2010)


Time : Three hours Maximum: 100 marks

Answer ALL questions.

PART A — (10 x 2 20 marks)

1. What is the difference between a local variable and a data member?

2. Explain the purpose of a function parameter. What is the difference between a parameter and an argument?

3. Explain the multiple meanings of the operators « and » in C++ and their precedence.

4. What is a copy constructor?

5. What is a Function templates? Explain.

6. List five common examples of exceptions.

7. Give the use of protected access specifier.

8. Give the difference between virtual function and pure virtual function.

9. List the file-open modes.

10. What are the three standard template library adapters?


PARTB (5x 16=80 marks)

11. (a) Write brief notes on Friend function and show how Modifying a Class’s private Data With a Friend Function.

Or

(b) Write a C++ program that

(i) calculates and prints the sum of the integers from 1 to 10

(ii) to calculate x raised to the power y.

12. (a) Write a program to overload the stream insertion and stream extraction operators to handle data of a user-defined telephone number class called Phone Number.

Or

(b) (i) Explain ‘+‘ operator overloading with an example. (8)

(ii) Explain type conversion with suitable example (8)


13. (a) Define a DivideBy Zero definition and use it to throw exceptions on attempts to divide by zero.

Or

(b) Write a C++ program to demonstrate function template to print array of different types.


14 (a) Explain different types of inheritances

Or

(b) Demonstrate runtime polymorphism with an example.


15 (a) Write a C++ program that maintains a bank’s account information The program adds new accounts, deletes accounts in a text file. Assume that a file credit.dat has been created and the initial data has been inserted.

Or

(b) Write brief flotes on Standard template Library and Standard Library container classes. (16)

Anna University - OBJECT ORIENTED PROGRAMMING (OOPS) - Question Bank

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

ACADEMIC YEAR 2011- 2012 / ODD SEMESTER

Question Bank

Subject Code/Name: CS1202/Object Oriented Programming

Year / Sem : III / V
Department : EEE


UNIT – I

OBJECT AND CLASSES


PART – A (2 MARKS)

1. Define Object Oriented Programming.

2. Define Objects.

3. What are the features of Object oriented programming.

4. Define Encapsulation and Data hiding.

5. Define Data Abstraction.

6. Define Data members.

7. Define Member functions.

8. Define Inheritance.

9. Define Polymorphism.

10. List and define the two types of Polymorphism.

11. Define Dynamic Binding.

12. Define Message Passing.

13. List some benefits of OOPS.

14. List out the applications of OOP.

15. What is the return type of main ()?

16. List out the four basic sections in a typical C++ program.

17. Define Token. What are the tokens used in C++?

18. Define identifier. What are the rules to be followed for identifiers?

19. State the use of void in C++.

20. Define an Enumeration data type.

21. Define reference variable. Give its syntax.

22. List out the new operators introduced in c++.

23. What is the use of Scope resolution operator?

24. List out the memory referencing operators.

25. Define Implicit Conversion.

26. What is call by reference?

27. What are inline functions?

28. State the advantages of Default Arguments.

29. Define Function overloading.

30. Define friend function.

PART – B

1. Explain the basic concepts of Object oriented programming (16)

2. Explain the use of constant pointers and pointers to constant with an example.(16)

3. a. State the differences between class and struct and also illustrate with an example. (8)

b. What are the difference between pointers to constants and constant to

pointers? (8)

4. a. Write a C++ program using inline function. (8)

b. Write a C++ program to illustrate the static function (8)

5. Explain briefly about function overloading with a suitable example. (16)

6. a. Discuss constant and volatile functions. (8)

b. What is linkage specification and also explain its need. (8)

7. Explain about call by reference and return by reference with program. (16)

8. Explain Nested classes and local classes with an example (16)


UNIT – II CONSTRUCTORS AND OVERLOADING 

PART – A (2 MARKS)

1. Define Constructor.

2. List some of the special characteristics of constructor.

3. Give the various types of constructors.

4. What are the ways in which a constructor can be called?

5. What is meant by dynamic initialization of objects.

6. Define Destructor.

7. List some of the rules for operator overloading.

8. What are the types of type conversions?

9. What are the conditions should a casting operator satisfy?

10. How the objects are initialized dynamically?


PART – B

1. a. Explain the copy constructors with an example? (8)
b. Explain explicit Constructors, Parametrized Constructors, and multiple Constructors with suitable example. (8)

2. a. How to achieve operator overloading through friend Function? (8)
b. Write a program using friend functions for overloading <<and>>operators? (8)

3. Explain the wrapper classes with examples? (16)



UNIT – III


INHERITANCE AND POLYMORPHISM

PART – A (2 MARKS)

1. What are types of inheritance?

2. Give the syntax for inheritance.

3. Define single inheritance.

4. Define multi-level inheritance.

5. Define multiple inheritance.

6. What is an abstract class?

7. What are the types of polymorphism?

8. Define ‘this’ pointer.

9. What is virtual function?

10. When a function is declared as virtual, C++ determines which function to

11. What is pure virtual function?

12. Define RTTI.

13. What is cross casting?

14. What is down casting?

PART – B

1. Explain the different types of polymorphism (16)

2. Explain various types of Inheritance. (16)

3. Describe Pure Virtual function with an example. (16)

4. Write a C++ program using this pointer. (16)

5. Write a C++ program using dynamic_const. (16)

6. Explain in detail about cross casting and down casting. (16)


UNIT – IV


FILE MANIPULATION

PART – A ( 2 MARKS )

1. Define manipulators and also mention the manipulators that are used in C++.

2. What is the need for streams?

3. List some predefined streams.

4. What are the possible types that a file can be defined?

5. What are the two methods available for opening the files?

6. What is global namespace?

7. Write any four operations possible on string objects.

8. What are the advantages of using generic algorithm?

9. What is STL?

10. What is find()?

11. What are the ways that a string object can be created?

PART – B

1. Explain about Formattted and Unformatted IO with suitable Example (16)

2. What is manipulator? Difference between manipulators and ios Function? (16)

3. Explain the process of open,read,write and close files? (16)

4. Explain the role of seekg(),seekp(),tellg(),tellp(),function in the process of

random access in a binary file (16)

5. Explain about the STD Namespace (16)

6. Explain the Standard Template Library and how it is working? (16)


UNIT – V


TEMPLATE AND EXCEPTION HANDLING

PART – A (2 MARKS)


1. What is the need for template function in C++? What are their advantages?

2. What are the drawbacks of using macros?

3. What is Function Template?

4. What are the components of Exception Handling?

5. What is Uncaught Exception?

6. What is the terminate () functions?

7. What are the disadvantages of the exception handling?


PART – B


1. Explain the Function template (16)

2. Explain the class template (16)

3. What is the need for exception handling (16)

4. Explain the following function

5. a) What are specifications? In which case are they needed? (8)

b)What are the disadvantages of the exception handling mechanism? (8)

6. When do we need multiple catch blocks for a single try block? Give an example? (16)

Object Oriented Programming (OOPS) - Unit 5 - Streams

Download : Click Here to Download


Object Oriented Programming (OOPS) - Unit 4 - Inheritance and type casting

Download : Click Here to Download


Object Oriented Programming (OOPS) - Unit 3 - Templates and Exceptions

Download : Click Here to Download


Object Oriented Programming (OOPS) - Unit 2 - Constructors & Destructors

Download : Click Here to Download


Object Oriented Programming (OOPS) - Unit 1 - Lecture Notes

Download : Click Here to Download


Object Oriented Programming Question Bank


 QUESTION BANK Of  OOPs

UNIT I

PART A

1. What are the basic concepts of OOP?
2. What are objects?
3. What is class?
4. What is encapsulation?
5. Compare and contrast the notions of struct and class in C++.
6. What are pointers? What are the advantages of using pointers in programming?
7. What are the programming paradigms currently available?
8. What are the benefits of OOP language?
9. What is the default access mode for class members?
10. What is data abstraction?
11. What are data members and member functions?
12. Give any four applications of OOP.
13. What is a scope resolution operator (::)?
14. What is function prototype?
15. What is an inline function?
16. What is a default argument?
17. How to access a class member?
18. How to create an object?
19. What is static data member?
20. How the objects are used as function argument?
21. Define const member.
22. Define pointers to members.
23. What is the use of member dereferencing operator?
24. Define local classes and nested classes.
25. What are friend functrions?

PART B

1. Write a program to illustrate the manipulation using pointer to objects and pointer to member of a
class. [16]
2. Explain with suitable program to demonstrate how a function can be overloaded in different
ways. [16]
3. Illustrate the use of friend function with example program [16]
4. Write a program to find maximum between two numbers using friend class. [16]
5. (i) Explain object oriented paradigm with all its essential elements. [12]
    (ii) state the merits and demerits of OOP. [4]
6. (i) Explain the usage of friend keyword with an example program. [8]
    (ii) Write a C++ program to illustrate static function. [8]
7. What are friend functions and friend classes? Write a normal function which adds objects of the complex
number class. Declare this normal function as friend of the complex class. [8]
8. (i) List the applications of OOP. [4]
    (ii) Discuss on basic concepts of OOP. [8]
    (iii) Give general structure of C++ program. [4]
9. (i) Write short notes on inline function and default arguments. [4+4]
    (ii) Explain with example how you can use a common friend function to exchange the private values of two
classes. [8]
10. (i) How can you design a class? How to access data members? How is the message communication done to
access data members of other classes? [8]
(ii) Write down the merits and demerits of OO methodologies. [6]

DATA STRUCTURES AND OBJECT ORIENTED PROGRAMMING IN C++ Two Marks

Thanks to :
                   S.Vinila JinnyLecturer, 
                   Dept. of CSE
                   NOORUL ISLAM COLLEGE OF ENGINEERING,
                   KUMARACOIL


Download : Click Here to Download


Object Orientated Programming Language - Lecture Notes

  Provider :  
                     EINSTEIN COLLEGE OF ENGINEERING
                     Sir.C.V.Raman Nagar, Tirunelveli-12


         Help :  How to Download ?