SEVEN OAKS SCHOOL
III ASSESSMENT EXAMINATION (2023-24)
COMPUTER APPLICATIONS
(Theory)
CLASS 11
Answers to this Paper must be written on the paper provided separately.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the question paper.
The time given at the head of this Paper is the time allowed for writing the answers.
—————————————————————————————————————-
This Paper is divided into two Sections.
The intended marks for questions or parts of questions are given in brackets []
—————————————————————————————————————-
Time – 1.5 Hrs M.M. – 50
SECTION A
(Attempt all questions from this section)
Question 1. [5 x 2 = 10]
A. What is the difference between JDK, JRE, and JVM?
B. What is the purpose of garbage collection in Java? How does it work?
C. Write any two advantages of exception handling.
D. Each element of an array A[-20….20][10…..35] requires one byte of storage. If the array is
stored in column major order beginning location 500, determine the location of A[0,30].
E. The following function month() is a part of some class. What will be the output of the
function month()when the value of n is “ JANUARY” and the value of R is 5?
Show the dry run/working.
Void month( String n, int R)
{
if(R<0)
System.out.print(“ ”)};
else
{
System.out.println(n.charAt(R) + “.”);
Month(n, R-1);
}
}
SECTION B
(Attempt any four questions from this section)
Question 2. [10]
Design a class Convert to perform string related operations. The details of the class are given below:
Class name Convert
stg Stores the word
newstg Stores the changed word
len Stores the length of the word
Member functions/methods
Convert() Default constructor
void character() To accept a word
char caseconvert(char ch) Converts the case of the character and returns it
void reconvert(int) Extracts character using recursive technique and
changes its case using caseconvert() and form a
new word
void output() Displays both the words
Specify the class Convert giving details of the constructor, member functions void character(), char
caseconvert(char), void reconvert(int) and void output(). Define the main() function to create an object
and call the functions accordingly to enable the above change in the given word.
Question 3. [10]
A disarium number is a number in which the sum of digits top the power of their respective position is
equal to the number itself.
Example: 135= 12 + 32 + 53
Hence, 135 is a disarium number.
Design a class disarium to check if a given number is a disarium number or not. Some of the members of
the class are given below:
Class name Disarium
Data members/instance variables:
int num Stores the number
int size Stores the size of the number
Methods/member functions:
Dissarium(int nn) Parameterized constructor to initialize the data
members num=nn and size=0
void countDigit() Counts the total number of digits and assigns it to
size
int sumofDigits(int n, int p) Returns the sum of the digits of the number(n) to
the power of their respective positions (p) using
recursivetechnique
void check() Checks whether the number is a disarium number
and displays the result with a n appropriate
message
Specify the class Disarium giving the details of the constructor, void countDigit(), int sumofDigits(int, int)
and void check(). Define the main() function to create an object and call the functions according to
enable the task.
Question 4. [10]
A class Admission contains the admission numbers of 100 students. Some of the class member/ member
functions are given below:
Class name Admission
Data members/ instance variable
Adno[] Integer array to store admission numbers
Member functions/methods
Admission() Constructor to initialize the array elements
void fillArray() To accept the elements of the array in ascending
order
int binSearch(int u, int v) To search for a particular admission number(v)
using binary serach and recursive technique and
returns 1 if found otherwise returns -1
Specidfy the class Admission giving details of the constructor, void fillArray() and int binSearch(int, int,
int). Define the main() function to create an object and call the function accordingly to enable the task.
Question 5. [10]
A transpose of an array is obtained by interchanging the elements of the rows and columns.
A class Transarray contains a two-dimensional integer array of order [m X n]. the maximum value
possible for both ‘m’ and ‘n’ is 20. Design a class Transarray to find the transpose of a given matrix. The
details of the members of the class are given below:
Class name Transarray
Data members/ instance variables
arr[][] Stores the matrix elements
m Integer to store the number of rows
n Integer to store the number of columns
Member functions:
Transarray() Default constructor
Transarray(int mm, int nn) To initialize the size of the matrix, m=mm, n=nn
void fillarray() To enter the elements of the matrix
void transpose( Transarray A) To find the transpose of a given matrix
void disparray() Displays the array in a matrix form
Specify the class Transarray giving the details of the constructors, void fillarray(), void transpose
(Transarray) and void dosparray(). You need not to write the main function.
Question 6. [10]
A class PrimeFac contains an array of 50 integers. Some of the members of the class are given below:
Class name primeFac
Data members/ instance variables:
num[] Array to store integers
Freq[] Array to store the frequency of prime factors of
numbers
Member functions:
primeFac() Constructor to initialize array elements to 0
void enter() To enter values into array num[]
void frefac() To determine the frequency of prime factors of the
numbers stored in num[] and assign it to freq[]
void disp() To display both the arrays
Specify the class PrimeFac giving the details of constructor, void enter(), void frefac() and void disp().
You need not to write main function.