Icse Important Sheet by VXL 2023-24 Color
Icse Important Sheet by VXL 2023-24 Color
Section A - Each question carries the marks specified in front of it. Read the question carefully
and answer only how much is asked. For example, if one difference is asked, then write only one. But
if you are not sure about your answer then write more. The one that is correct would be marked.
You may keep the following points in mind while answering this section:-
Section A will be Multiple Choice Questions (MCQ) and it has 20 questions so give your answer
carefully, while writing the answers write option number along with respective answer like
Ans (i) (a) Encapsulation, sometimes two answers and close must check your answer twice.
In Question 2, show the working in prefix and postfix type questions as marking will be
stepwise. In writing java expression type answers use the proper brackets. In conversion type
questions(if to switch case, for to while loop etc.), write as much as it is given in question means i.e.
no need to write class and function etc. Write to the point precise answers. Use keywords while
answering definitions, differences, etc. For example, Constructor is a member function with the
same name as class and no return type. (Here, no return type and same name as class are
important keywords). Write differences, if asked, making two columns. Write example of each, if
you know. Do not leave any answer. Even if you don‟t know, write something as marking is not
negative. While attempting “write the output” type of questions, show the “Dry Run” working.
While attempting “solve” type of questions based on operators, show all the steps. Read the data
types used in the arithmetic expression carefully for showing the final answer. Learn the
definitions, syntax and return type of various String functions, Mathematical and Character
class related functions very well. You must revise three loops well and their inter conversions. U
1
must know the definitions and syntax of all “if-else” structures and “switch-case-default” well
and their inter-conversions. Study ternary operator with interconversion and output, learn the
method to write prototype of a function. Learn the definitions and example of OOP
principles. Theory and output based is important for this section.
Section B: The marking in this section is step-wise so need not worry. Plan the program
before you start writing as can’t afford to waste time in canceling and re-writing.
Write variable –description or comments for each program. Don’t forget as it carries 2 marks for
each question, No need to write both the things.
Read the question carefully and do not forget any step. So write the program step by step
keeping all points in mind.
Input based programs you must give a message because in case you forget to write VD or
comments then sometime board those marks for these messages.
Try to indent the program as it makes it neat.
Study if-else-if ladder structures, loops(pattern based, sum of series and number based
programs), arrays(1d and 2d) and functions and Strings well for this section. Don‟t forget to
prepare sorting and searching programs. You must know Mathematical and String functions as
they might be needed for such questions.
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
operator punctuator/separator DATA TYPE definition primitive data type-(range and
memory size) reference/composite/non primitive data type default values of various data types,
numeric and non numeric data type variable dynamic and static initialization Escape
2
sequence or nongraphic characters with example Scope of a variable Unary, Binary and
Ternary operator with example Unary + and binary + Arithmetic, relational and logical
operator with examples Postfix and prefix operator with their numerical ternary operator with
syntax and inter conversion between ternary and if else and their output precedence of operator
and their numerical Data conversion and its type i.e. Implicit/automatic/data
promotion/coercion and explicit/type casting Increment and decrement operator(postfix and
prefix operator) java expression using mathematical function like (abs, sqrt, pow, round, ceil,
floor, max, min, log, exp, rint, sin, cos , tan, rint, PI, random), difference between SOP and
SOPln, Variable and their type like class variable, instance variable and local variable with
example local and global variable visibility mode/access specifier (public, private and
protected, default is friendly), dot operator functions to convert string value to numeric
value(parse function) wrapper class CHARACTER FUNCTION(isDigit(), isUpperCase(),
isLowerCase(), toUpperCase(), toLowerCase(), isWhitespace(), isLetter(),boolean isLetterOrDigit()
function with their return type. Keywords = new, break, continue, this, final, static, extends,
import, void, public, private, protected, return FUNCTION advantages, syntax, access
specifier/visibility mode, modifier, return type message passing function prototype and
signature, writing function prototype pure and impure functions, library and user defined
function, System.exit(0) function overloading(definition, similarity and difference and advantage)
calling overloaded functions difference between function and constructor call by value and
call by reference CONSTRUCTOR definition, proprieties/characteristics, types of
constructors(non parameterized/default and parameterized constructor ,constructor overloading,
calling a constructor Wrapper Class Autoboxing and Unboxing in Wrapper class STRING
definition, how it is implemented, calculating size Types of error(compile time/syntax error,
runtime/execution time, logical error), string functions with their return types(trim, toLowerCase,
toUpperCase, length, charAt, indexOf, lastIndexOf, concat, equals, equalsIgnoreCase, compareTo,
compareToIgnoreCase, replace, substring, startsWith, endsWith, valueOf) Only Syntax, purpose,
working examples with output package with examples Control statements and its type
(selection or decision making statement, looping statement, jump statement) Switch statement,
its syntax, default keyword, fall through Control variable, ,dangling else problem with example
Types of loops (empty/null loop/time delay loop, nested loop, infinite loop) fixed loop(for)
Variable loop (while and do while), inter conversions of loops ARRAYS (definition, declaration,
initialization, calculation memory array size for 1D, calculation array length using length function,
base type of array, advantage and disadvantage, index number and indexed variable, Searching
=Linear and Binary Sorting =Bubble sort and selection sort technique and their working array
versus object 2D ARRAYS Declaration, initialization, accepting data in a double dimensional
array, sum of the elements in row, column and diagonal elements [ right and left], display the
elements of two-dimensional array in a matrix format.object as composite data type compound
statement/block Autoboxing and unboxing Types or errors and their examples(Syntax/compile
time, run time and logical error)
DIFFERENCE:
Array variable and class variable if else ternary while(entry control loop) and do-while(exit
control loop)switch and if-else index number and indexed variablefunction and constructor
prefix and postfix operator ordinary compilation and java compilationInterpreter and compiler
source code and object codeprimitive and reference data type relational and logical operator
function prototype and signaturepublic and private actual and formal parametercall by
value and call by referencepure and impure functioncalling function and calling constructor
parameterized and non parameterized constructor int and Integer conditional operator and
conditional statementfinite and infinite loopbreak and continueindexOf and lastIndexOf
equals and compareTo implicit and explicit data conversionSearching and Sorting == and
equals()sub and super classstatic and non static members local and Global variableslength()
and length functions.
CONVERSION:
Ternary to if else if else to switch case for to while and do while and vice versa do while to
while.
3
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
TOPIC TO STUDY FROM WHOLE SYLLABUS FOR SECTION B (60 MARKS)
IMPORTANT NOTE
Concentrate on following topics for programming section:
1. Programs based on function including constructor, input, calculation, display and main method
to call above function by creating object.
2. Programs based on function overloading (mainly based on sum of series, pattern or simple string
based topic)
3. Program from array i.e. linear search, Binary searc, bubble sort and selection sort and related
programs.
4. String programs based on extracting the character and performing some operations on extracted
characters and individual words of a senetence.
5. A menu driven program to check different numbers or to print sum of series or to print pattern
(pattern will be asked on based on right angle triangle, square and rectangle only).
6. Program based on while loop like extracting digits and use them for different purpose.
7. Simple Programs based 2D array and simple operation like sum of the elements in row, column
and diagonal elements [ right and left], display the elements of two-dimensional array in a matrix
format.
Suggestion: Each program must be written with comments OR variable descriptions, 4
to 5 comments are sufficient in a program. It is advisable to attempt extra program if
possible, don’t cut any program which you have already written even you are writing the
same program second time. If you are not getting any answer you must write down whatever
part of answer you know about the program because marking will be step wise in board
exam and there is no negative marking for anything. Do not spent spend much time on a
single program.
Most Important type Programs for Practice:
P1. Define a class called student with the following description:
Instance variables/data members: rollnum, name, marks, grade
Member methods:
student( ) : default constructor
void input() : to input roll number, name and total marks.
void compute() : to assign the grade based on following criteria:
Marks Grade
Above 90 A
>=75-<90 B
>=60-<75 C
>=40-<60 D
Below 40 E
void display() : to display the detail of the student in the following format:
Roll Number Name Marks Grade
**** ***** *** ***
Write the main method to create an object of the class and call the above member methods
accordingly.
P2. Anshul Transport Company charges for the parcels of its customers as per the following
specifications given below:
Class name : ATransport
Member variables:
String name : to store the name of the customer.
4
int w : to store the weight of the parcel in kg.
int charge : to store the charge of the parcel.
Member functions:
ATransport() : default constructor
void accept() : to accept the name of the customer, weight of the parcel from the user (using
Scanner class)
void calculate(): to calculate the charge as per the weight of the parcel as per the following criteria:
Weight in KG Charge per KG
Up to 10 kg Rs. 25 per kg
Next 20 kg Rs. 20 per kg
Above 30 kg Rs. 10 per kg
A surcharge of 5% is charged on the bill.
void print() : to print the name of the customer, weight of the parcel, total bill inclusive of
surcharge in a tabular form in the following format:
Name Weight Bill Amount
____ _____ ____ ____
Define the class with the above mentioned specifications, create a main() method, create an object
and invoke the member methods.
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
P3. The basic salary of employees is undergoing a revision. Define a class called Grade_Revision
with the following specifications:
Instance variables/data members:
String name : to store name of the employee
int bas : to store basic salary
int expn : to consider the length of service as an experience
double inc : to store increment
double nbas : to store new basic salary (basic + increment)
Methods :
Grade_Revision( ) : default constructor to initialize all data members
void accept( ) : to input name, basic and experience
void increment( ) : to calculate increment then new salary using (basic + increment) where
increment is given using following specification:
Experience Increment
Up to 3 years Rs. 1,000 + 10% of basic
3 years or more and up to 5 years Rs. 3,000 + 12% of basic
5 years or more and up to 10 years Rs. 5,000 + 15% of basic
10 years or more Rs. 8,000 + 20% of basic
5
Member functions :
Bank( ) : constructor to assign the data members as 0 or null
Get( ) : to accept the value for all the data members
depo( int amt) : to deposit parameterized value in amount
withdraw( int amt): to withdraw an amount after checking the balance(Minimum balance
should be Rs. 500 )
show( ) : to print the all the data members.
Now write a main function to create the object of the class and call above functions by
passing suitable value.
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
P5. Write a program in java for the following specification:
Class : Empl
Data Members : Emp_No , Name, BasicSalary, DA, HRA, TA, PF, GrossSalary
Member Methods :
void get ( ) : To accept Employee No., Name and Basic Salary of the employees
void calcu ( ) : To calculate the Gross Salary based on the following condition:
6
P14. Write a method to accept a name as parameter and print the initial first and then the
title. Example,
Input : AJAY PRATAP SINGH RATHORE
Output : A.P.S. RATHORE
P15.Write a program to input a string and print out the text with the uppercase and lowercase
letters reversed, but all other characters should remain the same as before.
INPUT : WelComE TO School
OUTPUT : wELcOMe to sCHOOL
P16.Write a program to accept any string: Count and print the number of pairs of consecutive
letters present in words in the forward direction only. Assume that all the letters in the string
are in the same case, consecutive letters in two different words are not counted and „za‟ or „ZA‟
in any word is not a consecutive pair.
INPUT : ABSTRACT STRING IS BEING COUNTED EDUCATIONALLY.
OUTPUT : Pairs of consecutive letter: 3
P17. Write a program in Java to accept a word and display the ASCII of each character in given
format.
Sample input : BLUEJ
Sample output :
ASCII of B : 66
ASCII of L : 75
ASCII of U : 84
ASCII of E : 69
ASCII of J : 73
P18. Write a program to accept a string. Convert the string to uppercase. Count and output the
number of double letter sequences that exist in the string.
Sample Input: SHE WAS FEEDING THE LITTLE RABBIT WITH AN APPLE
Sample Output: 4
P19. WAP to input any string print the first letter of each word in capital letters separated with
dots.
Input: This is a cat
Output: T.I.A.C
P20. WAP to accept a String and display only those characters which are consecutives.
Input : UNDERSTANDING COMPUTER APPLICATIONS
Output : D,E
R,S
S,T are consecutives characters
P21. Write a program to input numbers into a 5×5 integer matrix and find the sum of all numbers
in it and print it along with input matrix.
P22. Write a program to input numbers into a 4×4 integer matrix and print the largest and
smallest number present in matrix along with original matrix.
P23.Write a program to read in a 3×4 matrix and then ask for an input of a number and search its
position in the matrix. If found, print the indices where it is found, otherwise print “Not Found”.
P24. Write a program to input numbers into two 3×3 integer matrices and find their sum and store
it in the third matrix then print the resultant matrix.
P25. Write a program to input a square matrix of size 4x4 and calculate the sum of elements
present in positions:
7
(i) First row
(ii) Last row
(iii) Boundry element
(iv) Left diagonal
(v) Right diagonal
Print the above quantities with a proper message.
P26. Write a program to input a number and print whether the number is a "special number" or
not. A number is said to be special number if the sum of the factorial of the each digits of the
number is the same as the original number.
Sample Input: 145 is a special number because 1! + 4! + 5! = 1 + 24 + 120 = 145
where, ! stands for factorial of the number and the factorial value of a number is the product of all
integers from 1 to that number.
E.g: 5! = 1 * 2 * 3 * 4 * 5 = 120
P27. Write a program to input a number and check whether it is a disarium number or not, a
number is called disarium number its place value is powered with its digit and added produce the
same number like 135 i.e. 11+32+53=135.
P28. Write a program to check whether two numbers are amicable or not.
Two numbers are called Amicable Number if these two numbers are such that the sum of factors of
first number (i.e. excluding highest factor) is equal to second number and vise versa.
Example: 220 and 284, 6 and 6 etc.
P29. Write a program to input a number. Display the product of the successors of even digits of the
number entered by user.
Input : 2745
Output : 15
[Hint: The even digits are: 2 and 4
The product of successor of even digits is: 3*5= 15]
P30. A neon number is a number where the sum of digits of square of the number is equal to the
number. For example if the input number is 9, its square is 9*9 = 81 and sum of the digits is 9. i.e.
9 is a neon number.
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
P31. Design a class to overload a function compare ( ) as follows:
(i) void compare(int, int) : to compare number of digits of two parametrised integer values and
print the number having greater digits and print the message “Numbers are equal” if their digits are
equals..
(ii) char compare(char, char): to compare the numeric value of two characters and return the
character having bigger ASCII value, return „$‟ if their values are equals.
(iii) void compare(String, String) : to compare the length of the two strings and print the longer of
the two, if length are equal the print “Equal String”.
8
void hline(int n, char c):
if n=5 and c=‟#‟ then it prints
#
##
###
####
#####
P33. Design a class to overload a function series( ) as follows:
(i) double series(double n): it takes one double arguments and returns the sum of the series
1 2 3 4 n
S ..........
2 3 4 5 n 1
(ii) double series(double a, double n): with two double arguments and returns the sum of the series.
x x 2 x3 xn
S ............
1! 2! 3! n!
P34. Define a class to overload the method display() as follows:
void display() : To print the following format using nested loop
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1
void display(int n): To print the square of each digit of the given number in decimal format:
Example: n = 4329
output – 81.0
4.0
9.0
16.0
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
P35. Write a menu driven to calculate the following interest based on user choice:
S. Simple Interest
C. Compound Interest
Enter a choice and principle, rate and time then calculate the above quantities based on user
choice. You may use the following formula to calculate the above quantities:
principal * rate * time
Simple Interest 100
rate time
princiapl(1 ) principal
Compound Interest 100
P36. Write a menu driven to check the following based on user choice:
A. Abundant Number
B. Duck Number
Enter a choice a number and check above properties based on user choice.
Abundant number
A number that is smaller than the sum of its factor(excluding highest factor). Twelve is the smallest
abundant number – the sum of its factors is 1 + 2 + 3 + 4 + 6 = 16 , some other examples are by
18, 20, 24, and 30.
Duck number
Any number that contains one or more zeros. Example 102, 3030 etc.
9
124 K – BLOCK, KIDWAI NAGAR (in street of Balaji Park and Wedding Bell Banquet hall), Kanpur.
by : Vinod Kharay(MCA,M.Sc.,B.Ed.)
(cell :9336061496)
P37. Using the switch statement. Write a menu driven program to do the following: The user is
given the following options:
1. Factorial
2. Sunny Number
# Factorial of a number is a product of all the numbers from 1 to upto input number. Ex.
4!=1*2*3*4=24
# A number is called sunny if its consecutive number is a perfect square. Ex. 8 because its
consecutive in 9 which is a perfect square.
For an incorrect option, an appropriate error message should be displayed.
P38. A courier company charges differently for 'Ordinary' booking and 'Express' booking based on
the weight of the parcel as per the tariff given below:
Weight of parcel Ordinary booking Express booking
10
================================================================================
Vinod Kharay(MCA,M.Sc.(CS),B.Ed.)
cell :9336061496
11
Note: Please verify the date sheet from official website of council i.e. www.cisce.org
12