0% found this document useful (0 votes)
71 views1 page

Chapter2-3 Class 12 CS CBSE

This document contains questions about object-oriented programming concepts like abstraction, encapsulation, inheritance and polymorphism. It asks the student to define objects, classes and base/derived classes. It also compares procedural and object-oriented paradigms. Questions are asked about implementing encapsulation and reusability in C++. Function overloading is discussed as a way to implement polymorphism. Default arguments in functions and their benefits are explained with an example.

Uploaded by

Ramkumar Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views1 page

Chapter2-3 Class 12 CS CBSE

This document contains questions about object-oriented programming concepts like abstraction, encapsulation, inheritance and polymorphism. It asks the student to define objects, classes and base/derived classes. It also compares procedural and object-oriented paradigms. Questions are asked about implementing encapsulation and reusability in C++. Function overloading is discussed as a way to implement polymorphism. Default arguments in functions and their benefits are explained with an example.

Uploaded by

Ramkumar Anand
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Computer Science, Class XII, 2015-16

Chapter No.2
(Object Oriented Programming)
1. Explain all the features or five basic concepts of OOPs (i.e. Data Abstraction,
Encapsulation, Modularity, Inheritance and Polymorphism) with example.
2. Define an object and a class with one example of each?
3. What are the advantages of inheritance?
4. Give two advantages and disadvantages of OOP?
5. What is a base class & derived class? How are these two interrelated?
6. What is the difference between procedural programming paradigm & object oriented
programming paradigm?
7. “While implementing encapsulation, abstraction is also implemented”. Comment.
8. Encapsulation is one of the major properties of OOP? How is it implemented in C++?
9. Reusability of classes is one of the major properties of OOP. How is it implemented in
C++? /* CBSE 2001 */
10. Define the following terms: (i) Inheritance (ii) Encapsulation. /* CBSE 1998 */
11. Write the output of following C++ code. Also, write the name of feature of OOPs used in
the following program jointly illustrated by the function [I] to [IV]: /* CBSE 2011 */
#include<iostream.h>
void Line( ) //Function [I]
{ for (int L=1; L<=80; L++) cout<<”-“;
cout<<endl; }
void Line(int N) //Function [II]
{ for (int L=1; L<=N; L++) cout<<”*“;
cout<<endl; }
void Line(char C, int N ) //Function [III]
{ for (int L=1; L<=N; L++) cout<<C;
cout<<endl; }
void Line(int M, int N) //Function [IV]
{ for (int L=1; L<=N; L++) cout<<M*L;
cout<<endl; }
void main( )
{ int A=9, B=4, C=3;
char K=’#’;
Line(K,B);
Line(A,C);
}
Chapter No.3
(Function Overloading)
1. Illustrate the concept of function overloading with the help of an example. /*CBSE 2003, 2000,
2014*/
2. What do you understand Polymorphism? Give an example illustrating its use in a C++
program. /* CBSE 2004 */
3. How does function overloading implement polymorphism?
4. When do you think function overloading should be used?
5. Why do you think function overloading must be part of OOPs?
6. What do you mean by default arguments & what its limitation for using in a function?
7. What is the benefit of using default argument in a function? Give a suitable example to
illustrate it using C++ code. /* CBSE 2013 */
Mohd. Hashim, PGT (Computer Sc.), E-mail: [email protected] , 7417786626 1

You might also like