Object Oriented Programming (CSC161)
Object Oriented Programming (CSC161)
Course Description: The course covers the basic concepts of object oriented programming using
C++ programming language.
Course Objectives: The main objective of this course is to understand object oriented
programming and advanced C++ concepts such as composition of objects, operator overloads,
inheritance and polymorphism, file I/O, exception handling and templates.
Detail Syllabus
Text Book:
1. Robert Lafore, Object Oriented Programming in C++, Fourth Edition, SAMS publications.
2. Herbert Schildt, C++ The Complete Reference, Fourth Edition, Tata McGraw Hill
Publication.
Reference Books:
1. Deitel and Deitel, C++ How to Program, Third Edition, Pearson Publication.
2. Joyce Farrell, Object-oriented programming using C++, Fourth Edition, Cengage Learning.
For Unit 2:
For Unit 3:
- Write programs for illustrating the concepts of
o class and object
o constructor (default, parameterized, copy)
o destructor
o objects as function arguments
o returning objects from functions
For Unit 4:
For Unit 5:
For Unit 6:
For Unit 7:
For Unit 8:
Section A
Long Answer Questions
Attempt any two questions. [2*10=20]
1. What is object oriented programming? Explain objects, class, encapsulation, data hiding,
inheritance, and polymorphism.
2. Explain operator overloading. Write a program that overloads insertion and extraction
operators.
3. What is inheritance? Explain the ambiguities associated with multiple inheritance with
suitable example programs.
Section B
Short Answer Questions
Attempt any eight questions. [8*5=40]
5. What is the principle reason for passing arguments by reference? Explain with suitable
code.
6. Why constructor is needed? Explain different types of constructors with example.
7. Write a program that illustrates the conversions between objects of different classes
having conversion function in source object.
8. Explain the difference between private and public inheritance with suitable diagram.
9. Why friend function is required? Discuss with example.
10. How late binding is different from early binding. Write a program that explains late
binding using virtual function.
11. Why do we need exceptions? Explain “exceptions with arguments” with suitable
program.
12. What are the advantages of using the stream classes for I/O? Write a program that writes
object to a file.