+ All Categories
Home > Documents > VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page...

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page...

Date post: 25-Apr-2018
Category:
Upload: hahanh
View: 227 times
Download: 7 times
Share this document with a friend
18
Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING Year & Semester : IV Section : EEE - 1 & 2 Subject Code : CS6456 Subject Name : Object Oriented Programming Degree & Branch : B.E & EEE Staff in charge : Ms .R.Anitha & Ms. D.Kavitha UNIT-1 2 MARK QUESTIONS: 1. 1. What are the programming paradigms currently available? 2. What is object oriented paradigm? 3. What are the differences between structures and classes in C++? 4. Differentiate Object Oriented and Object Based Programming Languages. 5. What is Object Oriented Programming? How is it different from the Procedure Oriented Programming? 6. List any two drawbacks of procedure oriented languages. 7. What is meant by prototype based programming? 8. What is a Class? What is an Object? Give an example for each 9. Define encapsulation. 10. Compare inheritance and delegation with respect to Object Oriented Programming. 11. Which feature of object oriented programming provides (a) data hiding (b) reusability? 12. Define (a) Object (b) class 13. What is the use of scope resolution operator :: in C++? 14. Can you have a class named main in C++? If yes how do you call its constructor? 15. What is an abstract class? 16. What is Object Orients Programming? List any four OOP languages. 17. What is meant by function overloading? 18. What are conditional constructor and destructor? 19. What is nameless object? 20. Give a note on access specifiers. Downloaded from www.Rejinpaul.com Get Unique study materials from www.rejinpaul.com
Transcript
Page 1: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Prepared By Staff 1 & Staff 2  Page 1 

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203.

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Year & Semester : IV Section : EEE - 1 & 2 Subject Code : CS6456 Subject Name : Object Oriented Programming Degree & Branch : B.E & EEE Staff in charge : Ms .R.Anitha & Ms. D.Kavitha

UNIT-1

2 MARK QUESTIONS:

1. 1. What are the programming paradigms currently available? 2. What is object oriented paradigm? 3. What are the differences between structures and classes in C++? 4. Differentiate Object Oriented and Object Based Programming Languages. 5. What is Object Oriented Programming? How is it different from the Procedure Oriented 

Programming? 6. List any two drawbacks of procedure oriented languages. 7. What is meant by prototype based programming? 8. What is a Class? What is an Object? Give an example for each 9. Define encapsulation. 10. Compare inheritance and delegation with respect to Object Oriented Programming. 11. Which feature of object oriented programming provides (a) data hiding                   (b) reusability? 

12. Define (a) Object   (b) class 13. What is the use of scope resolution operator :: in C++? 14. Can you have a class named main in C++? If yes how do you call its constructor? 15. What is an abstract class? 16. What is Object Orients Programming? List any four OOP languages. 17. What is meant by function overloading? 18. What are conditional constructor and destructor? 19. What is nameless object? 20. Give a note on access specifiers. 

       

Downloaded from www.Rejinpaul.com

Get Unique study materials from www.rejinpaul.com

Page 2: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Prepared By Staff 1 & Staff 2  Page 2 

16 MARK QUESTIONS:

1. Describe the basic concepts of Object Oriented Programming and bring out the advantages of OOP. 

2. Explain the declaration and defining a class in C++. How will you define the member functions of a class? Explain. 

3. What is the need for parameterized constructors? Explain the function of constructors with their declaration and definition inside a class. 

4. Illustrate the reserved word inline with two examples. 5. Explain the constructors and destructors. 6. explain the relation between (i)structured Programming(POP) and (ii)OOPs 7. Differentiate Object Oriented and Object based Languages.(8) 8. Explain copy constructor? Explain with a suitable example. 9. Differentiate Object Oriented and Object based Languages. Give examples for both.  List any 8 

features of Oops. (Detailed explanation or examples are not required). 10. Explain the following terms with respect to OOPS .Give suitable examples (i) Dynamic Binding (ii) Message Passing  

        (iii) Reusability         (iv) Polymorphism

UNIT-2

2 MARK QUESTIONS: 1. Define interfaces in java .How interfaces are implemented? How they can be accessed? How to 

apply interfaces? What is meant by extension of interfaces? Explain with an example. 2. What are threads? Synchronization? Explain the life cycle of thread with example 3. Explain life cycle of applet with example 4. Explain in detail exception handling in java 5. Explain in detail about JAVA  I/O operations 6. Explain  Inheritance in JAVA  7. Develop a real‐life application program to illustrate the use of multithreads. 8. Explain with an example how multiple inheritances is achieved in Java. 9. How is synchronization of threads performed? 10. An educational institution wishes to maintain its employee’s database which is divided into a 

number of classes with minimum information as shown in figure. Specify all the classes and define methods to create the database and retrieve individual information as when required. 

11. Explain the life cycle of an applet and write a simple applet to display a moving banner. 12. What is the purpose of garbage collection in Java, and when is it used? 

 

13. Give the importance of operator overloading. 14. Differentiate overloaded and overridden functions. 15. What is the main purpose of a template in C++? Give an example. 16. Write a program to exchange values of two variables. Use template variables as function 

arguments. 17. What is hierarchical inheritance? 

Downloaded from www.Rejinpaul.com

Get Unique study materials from www.rejinpaul.com

Page 3: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Prepared By Staff 1 & Staff 2  Page 3 

18. What are the operators of C++ that cannot be overloaded? 19. Can friendship between classes be symmetric or transitive? Justify your answer with an 

example. 20. What is the use of virtual function? 

 16 MARK QUESTIONS:

1. What is operator overloading? How will you define it? Illustrate unary operator overloading with an example. 

2. Describe the syntax of multiple inheritance. When do we use such an inheritance? Explain with an example. 

3. Define friend class and specify its importance. Explain with suitable example. 4. Explain the operators used for dynamic memory allocation with examples. 5. Define functional overloading with example.  6. Explain in detail the various types of Inheritance with example programs 7. Explain virtual function in C++. Describe any two applications in which virtual functions may use. 

For each of these applications, specify the parent classes and derived classes. 8. What are inline functions? What are their advantages? Give an example .What is the rules to be 

followed while defining inline functions? 9. What is the need for and advantages of Templates? What is the difference between function 

template and class template? 10. What are the various type conversions? Explain each with a program 

UNIT-3

2 MARK QUESTIONS: 1. Draw console stream class hierarchy. 2. Describe how exceptions are handled. 3. What are file pointers? 4. Give any two examples of exceptions. 5. What are the predefined C++ stream objects? 6. What stream class is required to create an output stream? 7. Why is it not possible to refer an exception declared within try block outside try block? 8. Explain the various file stream classes needed for file manipulation. 9. What are file pointers? Describe get‐pointers and put‐pointers. 10. What is an I/O stream? 11. Why is it necessary to include the file iostream in all our programs? 12. Name the two ways in which a file can be opened. 13. Illustrate the exception handling mechanism 14. What are the file stream classes used for creating input and output files? 15. List out any four containers supported by Standard Template Library? 16. What is Seekg() and Seekp()?Give Example ? 17. What is rethrowing an expression? 18. What are the classes in iostream.h header files? 19. What is an exception? Give any four examples of exception. 20. What are the types of exceptions? 

 

 

Downloaded from www.Rejinpaul.com

Get Unique study materials from www.rejinpaul.com

Page 4: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Prepared By Staff 1 & Staff 2  Page 4 

16 MARK QUESTIONS: 1. What is meant by exceptions? How an exception is handled in C++? Bring out the advantages of 

using various exception handling mechanisms. 2. Explain the hierarchy of Stream classes in C++ 3. Give the hierarchy of console stream classes 4. Explain in detail about STRINGS in C++, with necessary examples 5. Explain in detail the various File handling Operations 6. What are the keywords used in C++ for exception handling? Describe their usage with suitable 

example. 7. What are file modes? Describe various file mode options available in C++. 8. Explain the use of keywords try, catch and throw in handling exceptions in a program. Indicate 

how the control flows in case of occurrence and non‐occurrence of exceptions. Write a program to implement a stack with appropriate exception handling. 

9. Explain the 4 functions Seekg, Seekp, tellg, tellp used for setting pointers during file operation and show how they are derived from f stream class. 

10. Write a program to append to the contents of a file.  

UNIT-4 2 MARK QUESTIONS:

1. What is a token? List the various types of tokens supported by Java. 2. How do we add a class to a package? 3. In Java, can a class be defined inside a method? If so what rule governs access to the variables of 

the enclosing method? If not, give reasons. 4. How does Java achieve platform independence? 5. Distinguish between method overriding and method overloading in Java.  6. Justify the statement “ Java is platform independent” 7. Define Java Virtual Machine. 8. What is a package? 9. What is the type of class for which objects cannot be created? 10. What type of inheritance is supported in Java? 11. What is java Virtual machine? 12. What is default for methods in Java? 13. What is the need for java virtual machine? 14. What is wait(), notify(), notifyall()? 15. What method can be used for changing case of characters? 16. How can overriding be prevented? 17. What are the two ways of using Super Keyword? 18. What are the ways of calling a method in Java? 19. What is abstract class in Java? 20. Give the paint method of an applet which draws a blue circle. 

16 MARK QUESTIONS: 1. How is object class created in java environment ?Discuss on objects in java 2. Explain in detail about JAVA VIRTUAL MACHINE 3. Briefly explain about JAVA Byte‐code 4. What is the purpose of using packages? How to create user‐defined package? Give an example. 

Downloaded from www.Rejinpaul.com

Get Unique study materials from www.rejinpaul.com

Page 5: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Prepared By Staff 1 & Staff 2  Page 5 

5. Explain in detail about java documentation. 6. Explain about arrays(matrix multiplication) and strings in java 7. What is meant by Overloading objects? How are related classes used in java? 8. Differentiate abstract classes and interfaces  9. Describe the structure of a typical Java program. 10. How can a subclass call a method or a constructor defined in a super class? Illustrate with an example program. 

UNIT-5 2 MARK QUESTIONS:

1. What are the similarities between interfaces and classes in Java? 2. How do we set priorities for threads? 3. What happens if an exception handler is not defined when exception is thrown? 4. Explain the life cycle of thread.  5. Compare interface and abstract class. 6. What is the major difference between interfaces and a class? 7. What are the two methods by which we may stop threads? 8. What is an exception? Give any four examples of exception.  9. List any four advantages of inheritance. What type of inheritance is not supported by Java 10. What is multithreading? 11. What is an exception? 12. What is an interface? Write an interface to define the few constants, in Java. 13. What is final and finally? 14. Does Java support multiple inheritance? Justify your answer. 15. What is the difference between an abstract class and an interface in Java? 16. What is meant by binding? 17. Can array become private member of the class? How? 18. What is meant by anonymous Union? 19. What is Static data member? 20. What is Polymorphism? 

 16 MARK QUESTIONS:

1. Define interfaces in java .How interfaces are implemented? How they can be accessed? How to apply interfaces? What is meant by extension of interfaces? Explain with an example. 

2. What are threads? Synchronization? Explain the life cycle of thread with example 3. Explain life cycle of applet with example 4. Explain in detail exception handling in java 5. Explain in detail about JAVA  I/O operations 6. Explain  Inheritance in JAVA  7. Develop a real‐life application program to illustrate the use of multithreads. 8. Explain with an example how multiple inheritances is achieved in Java. 9. How is synchronization of threads performed? 10. An educational institution wishes to maintain its employee’s database which is divided into a 

number of classes with minimum information as shown in figure. Specify all the classes and define methods to create the database and retrieve individual information as when required.  

 

Downloaded from www.Rejinpaul.com

Get Unique study materials from www.rejinpaul.com

Page 6: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Prepared By Staff 1 & Staff 2  Page 6  

Downloaded from www.Rejinpaul.com

Get Unique study materials from www.rejinpaul.com

Page 7: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Page 1  

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Year & Semester : IV Section : EEE - 1 & 2 Subject Code : CS6456 Subject Name : Object Oriented Programming Degree & Branch : B.E & EEE

UNIT-1

2 MARK QUESTIONS:

1. 1. What are the programming paradigms currently available? 2. What is object oriented paradigm? 3. What are the differences between structures and classes in C++? 4. Differentiate Object Oriented and Object Based Programming Languages. 5. What is Object Oriented Programming? How is it different from the Procedure Oriented 

Programming? 6. List any two drawbacks of procedure oriented languages. 7. What is meant by prototype based programming? 8. What is a Class? What is an Object? Give an example for each 9. Define encapsulation. 10. Compare inheritance and delegation with respect to Object Oriented Programming. 11. Which feature of object oriented programming provides (a) data hiding                   (b) reusability? 

12. Define (a) Object   (b) class 13. What is the use of scope resolution operator :: in C++? 14. Can you have a class named main in C++? If yes how do you call its constructor? 15. What is an abstract class? 16. What is Object Orients Programming? List any four OOP languages. 17. What is meant by function overloading? 18. What are conditional constructor and destructor? 19. What is nameless object? 20. Give a note on access specifiers. 

       

www.universityquestions.in

www.universityquestions.in

Page 8: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Page 2  

16 MARK QUESTIONS:

1. Describe the basic concepts of Object Oriented Programming and bring out the advantages of OOP. 

2. Explain the declaration and defining a class in C++. How will you define the member functions of a class? Explain. 

3. What is the need for parameterized constructors? Explain the function of constructors with their declaration and definition inside a class. 

4. Illustrate the reserved word inline with two examples. 5. Explain the constructors and destructors. 6. explain the relation between (i)structured Programming(POP) and (ii)OOPs 7. Differentiate Object Oriented and Object based Languages.(8) 8. Explain copy constructor? Explain with a suitable example. 9. Differentiate Object Oriented and Object based Languages. Give examples for both.  List any 8 

features of Oops. (Detailed explanation or examples are not required). 10. Explain the following terms with respect to OOPS .Give suitable examples (i) Dynamic Binding (ii) Message Passing  

        (iii) Reusability         (iv) Polymorphism

UNIT-2

2 MARK QUESTIONS: 1. Define interfaces in java .How interfaces are implemented? How they can be accessed? How to 

apply interfaces? What is meant by extension of interfaces? Explain with an example. 2. What are threads? Synchronization? Explain the life cycle of thread with example 3. Explain life cycle of applet with example 4. Explain in detail exception handling in java 5. Explain in detail about JAVA  I/O operations 6. Explain  Inheritance in JAVA  7. Develop a real‐life application program to illustrate the use of multithreads. 8. Explain with an example how multiple inheritances is achieved in Java. 9. How is synchronization of threads performed? 10. An educational institution wishes to maintain its employee’s database which is divided into a 

number of classes with minimum information as shown in figure. Specify all the classes and define methods to create the database and retrieve individual information as when required. 

11. Explain the life cycle of an applet and write a simple applet to display a moving banner. 12. What is the purpose of garbage collection in Java, and when is it used? 

 

13. Give the importance of operator overloading. 14. Differentiate overloaded and overridden functions. 15. What is the main purpose of a template in C++? Give an example. 16. Write a program to exchange values of two variables. Use template variables as function 

arguments. 17. What is hierarchical inheritance? 

www.universityquestions.in

www.universityquestions.in

Page 9: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Page 3  

18. What are the operators of C++ that cannot be overloaded? 19. Can friendship between classes be symmetric or transitive? Justify your answer with an 

example. 20. What is the use of virtual function? 

 16 MARK QUESTIONS:

1. What is operator overloading? How will you define it? Illustrate unary operator overloading with an example. 

2. Describe the syntax of multiple inheritance. When do we use such an inheritance? Explain with an example. 

3. Define friend class and specify its importance. Explain with suitable example. 4. Explain the operators used for dynamic memory allocation with examples. 5. Define functional overloading with example.  6. Explain in detail the various types of Inheritance with example programs 7. Explain virtual function in C++. Describe any two applications in which virtual functions may use. 

For each of these applications, specify the parent classes and derived classes. 8. What are inline functions? What are their advantages? Give an example .What is the rules to be 

followed while defining inline functions? 9. What is the need for and advantages of Templates? What is the difference between function 

template and class template? 10. What are the various type conversions? Explain each with a program 

UNIT-3

2 MARK QUESTIONS: 1. Draw console stream class hierarchy. 2. Describe how exceptions are handled. 3. What are file pointers? 4. Give any two examples of exceptions. 5. What are the predefined C++ stream objects? 6. What stream class is required to create an output stream? 7. Why is it not possible to refer an exception declared within try block outside try block? 8. Explain the various file stream classes needed for file manipulation. 9. What are file pointers? Describe get‐pointers and put‐pointers. 10. What is an I/O stream? 11. Why is it necessary to include the file iostream in all our programs? 12. Name the two ways in which a file can be opened. 13. Illustrate the exception handling mechanism 14. What are the file stream classes used for creating input and output files? 15. List out any four containers supported by Standard Template Library? 16. What is Seekg() and Seekp()?Give Example ? 17. What is rethrowing an expression? 18. What are the classes in iostream.h header files? 19. What is an exception? Give any four examples of exception. 20. What are the types of exceptions? 

 

 

www.universityquestions.in

www.universityquestions.in

Page 10: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Page 4  

16 MARK QUESTIONS: 1. What is meant by exceptions? How an exception is handled in C++? Bring out the advantages of 

using various exception handling mechanisms. 2. Explain the hierarchy of Stream classes in C++ 3. Give the hierarchy of console stream classes 4. Explain in detail about STRINGS in C++, with necessary examples 5. Explain in detail the various File handling Operations 6. What are the keywords used in C++ for exception handling? Describe their usage with suitable 

example. 7. What are file modes? Describe various file mode options available in C++. 8. Explain the use of keywords try, catch and throw in handling exceptions in a program. Indicate 

how the control flows in case of occurrence and non‐occurrence of exceptions. Write a program to implement a stack with appropriate exception handling. 

9. Explain the 4 functions Seekg, Seekp, tellg, tellp used for setting pointers during file operation and show how they are derived from f stream class. 

10. Write a program to append to the contents of a file.  

UNIT-4 2 MARK QUESTIONS:

1. What is a token? List the various types of tokens supported by Java. 2. How do we add a class to a package? 3. In Java, can a class be defined inside a method? If so what rule governs access to the variables of 

the enclosing method? If not, give reasons. 4. How does Java achieve platform independence? 5. Distinguish between method overriding and method overloading in Java.  6. Justify the statement “ Java is platform independent” 7. Define Java Virtual Machine. 8. What is a package? 9. What is the type of class for which objects cannot be created? 10. What type of inheritance is supported in Java? 11. What is java Virtual machine? 12. What is default for methods in Java? 13. What is the need for java virtual machine? 14. What is wait(), notify(), notifyall()? 15. What method can be used for changing case of characters? 16. How can overriding be prevented? 17. What are the two ways of using Super Keyword? 18. What are the ways of calling a method in Java? 19. What is abstract class in Java? 20. Give the paint method of an applet which draws a blue circle. 

16 MARK QUESTIONS: 1. How is object class created in java environment ?Discuss on objects in java 2. Explain in detail about JAVA VIRTUAL MACHINE 3. Briefly explain about JAVA Byte‐code 4. What is the purpose of using packages? How to create user‐defined package? Give an example. 

www.universityquestions.in

www.universityquestions.in

Page 11: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

Page 5  

5. Explain in detail about java documentation. 6. Explain about arrays(matrix multiplication) and strings in java 7. What is meant by Overloading objects? How are related classes used in java? 8. Differentiate abstract classes and interfaces  9. Describe the structure of a typical Java program. 10. How can a subclass call a method or a constructor defined in a super class? Illustrate with an example program. 

UNIT-5 2 MARK QUESTIONS:

1. What are the similarities between interfaces and classes in Java? 2. How do we set priorities for threads? 3. What happens if an exception handler is not defined when exception is thrown? 4. Explain the life cycle of thread.  5. Compare interface and abstract class. 6. What is the major difference between interfaces and a class? 7. What are the two methods by which we may stop threads? 8. What is an exception? Give any four examples of exception.  9. List any four advantages of inheritance. What type of inheritance is not supported by Java 10. What is multithreading? 11. What is an exception? 12. What is an interface? Write an interface to define the few constants, in Java. 13. What is final and finally? 14. Does Java support multiple inheritance? Justify your answer. 15. What is the difference between an abstract class and an interface in Java? 16. What is meant by binding? 17. Can array become private member of the class? How? 18. What is meant by anonymous Union? 19. What is Static data member? 20. What is Polymorphism? 

 16 MARK QUESTIONS:

1. Define interfaces in java .How interfaces are implemented? How they can be accessed? How to apply interfaces? What is meant by extension of interfaces? Explain with an example. 

2. What are threads? Synchronization? Explain the life cycle of thread with example 3. Explain life cycle of applet with example 4. Explain in detail exception handling in java 5. Explain in detail about JAVA  I/O operations 6. Explain  Inheritance in JAVA  7. Develop a real‐life application program to illustrate the use of multithreads. 8. Explain with an example how multiple inheritances is achieved in Java. 9. How is synchronization of threads performed? 10. An educational institution wishes to maintain its employee’s database which is divided into a 

number of classes with minimum information as shown in figure. Specify all the classes and define methods to create the database and retrieve individual information as when required.  

 

www.universityquestions.in

www.universityquestions.in

Page 12: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 1

J.K.K.MUNIRAJAH COLLEGE OF TECHNOLOGY

T.N.PALAYAM, GOBI (TK) ERODE- 638506.

B.E-ELECTRICAL AND ELECTRONICS ENGINEERING

Regulation 2013

Fourth Semester

CS 6456 – OBJECT ORIENTED PROGRAMMING

UNITWISE POSSIBLE QUESTIONS

MAY/JUNE - 2015

Prepared by,

A.LOGESWARAN M.E, MISTE.,

(Asst.Professor, IT)

www.Vidyarthiplus.com

www.Vidyarthiplus.com

Page 13: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 2

PART – A

UNIT I

1. Differentiate object oriented programming from procedure oriented programming.

2. Define abstraction and encapsulation.

3. Differentiate between object and class.

4. List some applications of oop.

5. What is object oriented programming?

6. List the operators used in C++ for handling memory.

7. What is function prototype? Give its specification.

8. What is the difference between a pointer and a reference?

9. What is a namespace?

10. State the purpose of namespaces with an example.

11. What is meant by ADT and abstract class?

UNIT II

1. What is dynamic constructor? Give an example.

2. Write copy constructor for class date (assume mm, dd, yy as its members).

3. When will the destructor be called? Is it implicit or explicit?

4. What are copy constructors?

5. Highlight the advantages of static data members and static functions in C++.

6. What is destructor?

7. Define attribute.

8. Define operator overloading.

9. State the significance of this pointer in C++.

10. What is encapsulation? Does friend function violate encapsulation?

11. List the operators that cannot be overload.

12. What is a friend function?

13. Why can’t friend function be used to overload assignment operator?

14. What is the use of operator overloading?

15. What is friend class?

16. What are merits of using classes?

www.Vidyarthiplus.com

www.Vidyarthiplus.com

Page 14: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 3

UNIT III

1. What is difference between a function template and template function?

2. What is STL, Standard Template Library?

3. How are virtual functions declared in C++?

4. What is single inheritance?

5. What is to be done if we inherit some of the properties of constructor?

6. What is abstract class in cpp in C++?

7. Compare overloading and overriding.

8. Define exceptions. Give an example.

UNIT IV

1. What is JVM?

2. What is byte code? Mention its advantage.

3. Give sample statement for parseInt() and give comments for the statement.

4. Why is java language called as ‘robust’?

5. What is inner class?

6. What is the difference between super class and subclass?

UNIT V

1. List any four packages in java and highlight their features.

2. What are packages?

3. Define interface. State its use.

4. What is the difference between an interface and an abstract class?

5. What is API package?

6. Under which contexts would you use ‘final’ and ‘finally’.

7. What is the difference between throw and throws?

8. What are the advantages of using exception handling?

9. What are the two ways of creating java threads?

10. What is thread? How does it differ from a process?

11. What is multithreading?

12. Which class and interface in java is used to create thread and which is the most advantageous one?

13. What is the difference between the String and String Buffer classes?

14. What is stream? What is input stream?

15. Name the two super classes used in character stream.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

Page 15: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 4

PART - B

UNIT I

1. What are the needs for object oriented paradigm?

2. Explain in detail of object oriented concepts.

3. Explain the characteristics of OOPS in detail.

4. List the features of object oriented programming.

5. Explain data encapsulation and inheritance in detail.

6. Explain the structure of C++ program.

7. Explain various control statements used in C++.

8. Explain Do-While with an example.

9. Compare inline functions of C++ with ordinary functions and with macros.

10. What is dynamic binding? How is it achieved?

11. Write short notes on call and Return Reference.

12. Write short notes on New and Delete Operators.

13. Write a C++ program to implement dynamic memory allocation.

14. Explain the concept of ADT with some illustrative example.

UNIT II

1. Explain in detail about data hiding.

2. Write a C++ program that will ask for a temperature in Fahrenheit and display.

3. Write a program to declare array of objects, initialize and display the contents of arrays.

4. Explain in detail about class, objects, methods and messages.

5. Write about static member variable and static member functions.

6. Write about object creation and destruction.

7. Write a program to illustrate multiple constructors and default argument for a single class.

8. Write a C++ program to define overload constructor to perform string initialization, string copy and

string destruction.

9. Write a C++ program to generate Fibonacci using copy constructor.

10. Discuss the characteristics of constructors and destructors.

11. What are constructors? Explain the concept of destructor with an example.

12. Explain the constructors and destructors in detail with an example program.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

Page 16: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 5

13. Explain friend function with an example.

14. Write a program to perform multiplication using an integer and object. Use friend function.

15. Design calculator using function overloading.

16. Illustrate the concept of function overloading to find the maximum of two numbers.

17. Write about operator overloading with an example.

18. Write a C++ program to implement C=A+B, C=A-B and C-A*B where A, B and C are objects

containing a int value (vector).

19. Write a program to concatenate two strings using + operator overloading.

20. Write a program using operator overloading to add two time values in the format HH:MM:SS to the

resulting time along with rounding off when 24 hrs is reached. A time class is created and operator + is

overloaded to add the two time class objects.

21. Write the list of rules for overloading operators with one example.

UNIT III

1. Explain the usage of templates in C++.

2. Describe templates and its types.

3. Explain function templates with an example.

4. Explain major categories of containers supported by STL.

5. Explain the components of standard template library in detail.

6. Explain with examples, the types of inheritance in C++.

7. What is multiple inheritances? Discuss the syntax and rules of multiple inheritances in C++. How can

you pass parameters to the constructors of base classes in multiple inheritances? Explain with suitable

example.

8. What is inheritance? List out the advantages of inheritance.

9. Write a C++ program to illustrate the concept of hierarchical inheritance.

10. Explain the order in which the constructors are called when an object of derived class is created.

11. State the rules for virtual functions. Write a C++ program to declare a virtual function &demonstrate it.

12. Explain run time polymorphism with an example program in C++.

13. Explain about implementation of run time polymorphism in C++ with an example.

14. What is an abstract class? What is dynamic binding? How is it achieved?

15. What is the difference between a virtual function and a pure virtual function? Give example of each.

16. Explain about exception handling with an example program.

www.Vidyarthiplus.com

www.Vidyarthiplus.com

Page 17: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 6

17. Write a C++ program to generate user defined exception user inputs odd numbers.

UNIT IV

1. Explain the virtual machine concept with reference to java.

2. Explain the importance of JVM in JRE.

3. Explain various features of java.

4. Explain how C++ differs from java.

5. Write a java program to find factorial of a given number.

6. Write a menu based java program that can calculate the area of triangle, circle or square based on the

user’s choice.

7. Write a java program to find the sum of the following series.

1 - 2 + 3 - 4 +…. + n.

8. Write a java program to create two single dimensional arrays, initialize them and add them; store the

result in another array.

9. Write a java program to find the maximum number of given array.

10. Write a program to convert an integer array to string.

11. Discuss about java command line arguments.

12. Explain arrays and its types in detail with suitable example.

13. Create a complex number class in java. The class should have a constructor and methods to add,

subtract and multiply two complex numbers and to return the real and imaginary parts.

14. Write a java class called ‘student’ with name, marks of 3 subjects and total marks. Write another class

name calculate that gets marks of the student and calculates the total marks and displays the result.

(pass and fail).

15. Create class box and box3d. box3d is an extended class of box. The above two classes has to fulfill the

following requirement.

(i) Include constructor (ii) Set value of breadth, height (iii) find out area and volume.

16. Explain in detail about the inheritance mechanism in java with an example programs.

UNIT V

1. What are packages? How do they created and used?

2. Explain about packages in java.

3. How do we add a class or interface to a package?

www.Vidyarthiplus.com

www.Vidyarthiplus.com

Page 18: VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur ... · Prepared By Staff 1 & Staff 2 Page 1 VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur – 603203. DEPARTMENT

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

Page 7

4. Write a java program to implement nested packages.

5. Explain the interfaces in detail with suitable example.

6. What is an exception? List the java common exception types and causes.

7. Write a java program to add 2 integers and raise exception when any other character except number

(0-9) is given as input.

8. Write a java program to create a user defined exception whenever user input a word “hello”.

9. Write a program containing a possible exception. Use a try block and throw it and a catch block to

handle it properly.

10. Explain with an example program, exception handling in java.

11. Explain the life cycle of a thread in detail with an example.

12. What is a thread? How do you create threads?

13. What is multithreading? Explain with an example.

14. Explain about thread synchronization with an example.

15. Write a java program to perform all string operations using the string class.

16. Explain about various string operations in java.

17. Write short note on Strings in java.

18. Write a simple program to find a given string in a string array.

19. Write a java program to split a string into multiple java string objects.

20. Explain the concept of stream and its byte stream classes in detail.

21. Write a short note on various I/O streams in java.

22. Write a java program to demonstrate how to read and write data to a file.

*****BEST OF LUCK****

www.Vidyarthiplus.com

www.Vidyarthiplus.com


Recommended