JAVA, Python, C++ and C programs for students. Here you will also find solutions to boards papers of ISC Computer Science Practical and CBSE Computer Science. ISC and ICSE JAVA PROGRAMS
Tuesday, January 6, 2026
ISC Computer Science Theory Paper 2023 Sorting of Words in a String
Friday, January 22, 2021
ISC COMPUTER SCIENCE THEORY PAPER JAVA PROGRAMS - 2019 Question 11
Question 11
A linear data structure enables the
user to add address from rear end and remove address
from front. Define a class Diary
with the following details:
Class name :
Diary
Data members /
instance variables:
Q[ ] :
array to store the addresses
Size : stores the maximum capacity of the
array
start : to point the index of the front end
end : to point the index of the rear end
Member functions:
Diary (int max) :
constructor to initialize the data
member
size=max, start=0 and end=0
void pushadd(String n) :
to add address in the diary from the
rear end if possible, otherwise display
the message “ NO SPACE”
String popadd( ) :
removes and returns the address from
the
front end of the diary if any, else
returns “?????”
void show( ) :
displays all the addresses in the diary
(a) Specify the class Diary giving
details of the functions void pushadd(String) and
String popadd( ). Assume that the
other functions have been defined.
The main function
and algorithm need NOT be written.
(b) Name the
entity used in the above data structure arrangement : Answer QUEUE
In computer science, a queue is a collection of entities that are maintained in a sequence and can be modified by the addition of entities at one end of the sequence and the removal of entities from the other end of the sequence. By convention, the end of the sequence at which elements are added is called the back, tail, or rear of the queue, and the end at which elements are removed is called the head or front of the queue, analogously to the words used when people line up to wait for goods or services.
The operation of adding an element to the rear of the queue is known as enqueue, and the operation of removing an element from the front is known as dequeue. Other operations may also be allowed, often including a peek or front operation that returns the value of the next element to be dequeued without dequeuing it.
Monday, January 18, 2021
ISC COMPUTER SCIENCE THEORY PAPER JAVA PROGRAMS - 2019 Question 10
Definitions: A class that is derived from another class is called a subclass (also a derived class, extended class, or child class).
The class from which the subclass is derived is called a superclass (also a base class or a parent class).Excepting Object, which has no superclass, every class has one and only one direct superclass (single inheritance). In the absence of any other explicit superclass, every class is implicitly a subclass of Object.Classes can be derived from classes that are derived from classes that are derived from classes, and so on, and ultimately derived from the topmost class, Object. Such a class is said to be descended from all the classes in the inheritance chain stretching back to Object.
The idea of inheritance is simple but powerful: When you want to create a new class and there is already a class that includes some of the code that you want, you can derive your new class from the existing class.
In doing this, you can reuse the fields and methods of the existing class without having to write (and debug!) them yourself.A subclass inherits all the members (fields, methods, and nested classes) from its superclass.
Constructors are not members, so they are not inherited by subclasses, but the constructor of the superclass can be invoked from the subclass
ISC COMPUTER SCIENCE THEORY PAPER JAVA PROGRAMS - 2019 Question 10 - SECTION C
A super class Record contains
names and marks of the students in two different single
dimensional arrays. Define a sub
class Highest to display the names of the students
obtaining the highest mark.
The details of the members of both
the classes are given below:
Class name : Record
Data
member/instance variable:
n[ ] : array to store names
m[ ] :
array to store marks
size : to store the number of students
Member
functions/methods:
Record(int cap) :
parameterized constructor to initialize the data
member
size = cap
void readarray() :
to enter elements in both the arrays
void display( ) :
displays the array elements
Class name:
Highest
Data
member/instance variable:
index : to
store the index
Member functions/methods:
Highest(…) : parameterized
constructor to initialize the data
members
of both the classes
void find( ) :
finds the index of the student obtaining the
highest
mark and assign it to ‘index’
void display( ) :
displays the array elements along with the names and marks of the students who have
obtained the highest mark
Assume that the
super class Record has been defined. Using the concept of
inheritance,
specify the class Highest giving
the details of the constructor(…),void find( ) and
void display( ).
ISC COMPUTER SCIENCE THEORY PAPER JAVA PROGRAMS - 2019 Question 9
A class Rearrange has been defined to modify a word by bringing all the vowels in the
word at the beginning followed by the consonants.
Example: ORIGINAL becomes OIIARGNL
Some of the members of the class are given below:
Class name : Rearrange
Data member/instance variable:
wrd : to store a word
newwrd : to store the rearranged word
Member functions/methods:
Rearrange( ) : default constructor
void readword( ) : to accept the word in UPPER case
void freq_vow_con( ) : finds the frequency of vowels and consonants
in the word and displays them with an
appropriate message
void arrange( ) : rearranges the word by bringing the vowels at
the beginning followed by consonants
void display( ) : displays the original word along with the
rearranged word
Specify the class Rearrange, giving the details of the constructor( ), void readword( ),
void freq_vow_con( ), void arrange( ) and void display( ). Define the main( ) function to
create an object and call the functions accordingly to enable the task.


