ISC is one of the most reputed Board of Education under the category of Private Boards that serves standard of quality education to their students across the Country.Computer Science is one of the most interesting subject to prepare for exams.It is very important to get the main concept behind each and every algorithm, logics etc, than only one should be able to get good marks. As a graduate, I have tried to set this Sample Paper of Computer Science for ISC Board to help Board Students in order to get good marks While preparing this sample paper, some help has been taken from Board Exam papers and the referred textbooks. I hope this will be helpful for you.
General Instructions to be followed by the students:
(a) This paper is of total 80 marks.
(b) All questions are compulsory.
(c) Each question is of 10 marks.
(d) Marks are allotted to each question for your convenience.
Question-1. [10 Mark]
A class called Numeric has been defined to find and display the frequency of each digit present in the number and the product of the digits. Some of the members of the class are given below:
Data members: n-long integer type
(a) Member functions:Numeric (long a): A constructor to assign a to n.
(b) void frequency( ) : to find the frequency of each digit in the number n, and display it.
(c) int product( ) : to return the product of the digits of the number.
Specify the class Numeric giving the details of the constructor and the functions void frequency ( ) and int product ( ). Write the main method to create the object and print frequency of each digit and
product of each digit by calling above method.
Question-2. [10 Mark]
Design a class Convert to convert a decimal number to its equivalent in base 2 and to convert this binary number back to its decimal equivalent. E.g.
(i) The decimal number 35 is 100011 in base 2.
(ii) The decimal equivalent of binary number 100011 is 35.
Some of the members of the class are given below:
(a) Class name : Convert Data Members/ Instance Variables:
(b) N : integer to be converted to base 2.Member functions/ methods.
(c) Convert( ) : constructor to assign 0 to instance variable.
(d) long binary (int ) : to convert and return binary form of parametrized value.
(e) nt decibin(int ) : to convert and return decimal value of binary number passed in parameter
Specify the class Convert giving details of the constructor and the functions along with main method that accept a number and convert into binary form and again this binary number converted into decimal form. It print “BRILLIANT” if both the results are same otherwise print ”BETTER LUCK NEXT TIME”.
Question-3. [10 Mark]
A palindrome number is one that reads same from left to right or right to left. Example: 12321, 9834389. There is an ingenious method to get the palindrome from any positive integer. The procedure is as follows:
(a) Start with any positive number of 2 or more digits.
(b) Obtain another positive number by reversing the digits of the starting number.
(c) Add the 2 numbers together.
(d) Repeat the whole procedure with the sum as the starting number till you get the sum which is the palindrome number.
Example: start with 87.
1st Step 2nd Step 3rd Step 4th Step
87 165 726 1353
78 561 627 3531
Sum= 165 726 1353 4884
Question-4. [10 Mark]
A class Palin is designed to get a palindrome number for a positive number.
Class Palin is defined as follows:
int num : to store a 2 digit positive number.
Palin(int) : a constructor to initialize num with parameter.
boolean palindrome(int) : used to return true if parameterized value
is a palindrome
otherwise return false.
int ingenious( int) :a function that calculates and return the
for parameterized number if it is found within 5 steps
otherwise returns -1.
Specify the class, giving details of the functions members along with main method that accept a number and print its palindrome number by calling above methods.
Question-5. [10 Mark]
Class “MyArray” contains the employee code of 100 employees. Some of the member function/ Data members are given below:
Class name : MyArray
Data member : arr[ ] – integer
MyArray() : to assign the code to 0.
void fillarray() : to input the code in the arr void sortArr() :to sort the array variable using selection sort technique.
int binarySearch(int code) :to search and return 1 if an employee code is found in the array object else return 0. Write the class details. You do not need to write the main function.
Question-6. [10 Mark]
Class Name : Point
Member Data : x ( x coordinate), y ( y coordinate )
Member Function :
Constructors : Default and Parameterized
void display() : display point
double findDistance( Point) : inputs a point as parameter and returns
distance between current object and
parameterized object them.
Point findMidPoint( Point ) : returns midpoint between current abject
and parameterized object.
Now write a main method that accept to two point and calculate its mid point and distance between them with the help of above methods.
Question-7. [10 Mark]
Class Name : Saddle
Data Members : int arr[ ][ ] an integer array which can hold max 20 x 20 elements int N size of 2D integer array (square matrix form)
Member Function :
Saddle(int nk) : to initialize N to nk and accept only positive number in it.
void displayArray( ) : to display array in matrix form.
void saddlePoint() : to find the SADDLE POINT for the matrix. A saddle point is an element of the matrix such that it is the minimum element for the row to which is belongs and the maximum element for the column to which it belongs. Saddle point for a given matrix is always unique. If the matrix has no saddle point, output the message “NO SADDLE POINT”.
There is no need to write the main method.
Question-8. [10 Mark]
Your computer science teacher is trying to analyze the performance of the class in the previous exam. He has a class called Performance, which contains the marks of 60 students in the class. These are not sorted. He wants to find two quantities. Mode: the most frequently occurring mark in the class. If two or more marks occur equally frequently then the highest of these marks is the mode.
mode frequency: ,frequency at mode
You can make the following assumptions: the class has 60 students, the maximum marks anyone can get are 100 and the minimum is 0 all student marks are whole numbers. Important: You are not allowed to sort the marks. Some of the member functions/methods of Performance are given below:
Class name Performance Data members/instance variables:
mark[ ] an integer array to store the marks of 60 students.
mode-to store the mode , freqatmode-to store the frequency at mode.
Performance( ) :constructor,
void readmarks( ) :for reading the marks into the array,
int getmode( ) :for returning the mode,
int getfreqatmode( ) : for returning the frequency at mode ,
void calcmodeandfrequency( ):a single function that calculates both
mode and frequency at mode.
Specify the class Performance giving the details of the constructor, intgetmode( ),int getfreqatmode( ), void calcmodeandfrequency( ) only. You may assume that the other functions are written for you. You do not need to write the main function.
For any kind of suggestion related to the content of this paper or post, please let me know through comment section.