A beautiful ICSE class X practice Test
ICSE Class 10 practice Test: ICSE Class 10 Computer Applications practice test with important questions to revise before the computer exam.
For more java concepts click Wrapper classes in JAVA
In this paper most of the important topics of ICSE syllabus for class X java is covered.
- Section I (Theory) A. Answer the following questions. Write a function prototype of the following:
- A function ConcatChar which takes a string argument and a character argument and returns a string value.
- Write the java expression for the following.2AB/P2-S3
- Find the output of Z:int P= 4;int Z = ++P * (P-- + P++);
- What is a parameterized constructor?
- Name the package that contains Scanner class.
- Which unit of the class gets called, when the object of the class is created?
What is function overloading? Explain with example.
Explain the function prototype and the signature?
Rewrite the following using if....else
- double disc=(cost>4000)? cost*5/100 : 60;
Write statements for the following
- To create an object of class Student with default constructor.
- To invoke a method of class Student i.e ShowResult(int marks)
Analyze the following code and state at which iteration does value of b will equate to the initial value of a.
int a=20, int b=15
while (a>10)
{
a--;
b++;
- } Section II (Programs)
Attempt any two programs [2X10=20]
- Define a class to overload a function Sum() as follows:
int Sum(int a, int b) – with two integer arguments (a and b) calculate and return the sum of all the even numbers in the range of a and b.
Sample input: a=4 and b=16
Sample output: sum = 4 + 6 + 8 + 10 + 12 + 14 + 16
double Sum( double n ) - with one double arguments(n) calculate and return the product of the following series:
sum = 1.0 x 2.0 x 3.0 x..........x n
int Sum(int n) - with one integer argument (n) calculate and return sum of only odd digits of the number n
Sample Input : N=43961
Sample output : surg 3+9+ 1= 13
- Define the class called Transport with the following description.Class : TransportData members: String name: to enter the name int wt: to enter the weight of the parcel int charge: To calculate the charges to be paid for the parcel.Member Functions: Transport(): default constructor to assign the values to the data members void input():To input the details void display() : To display the details void compute(): to calculate the charges to be paidThe charges for the transport company are as follows weight of the parcel charges/kg up to 10 kg Rs/- 30 11 to 25 Rs/- 25 26 to 40 Rs/- 20 More than 40 Rs/- 15Write a main method to create an object of the class and call the above member methods.
- Write a program to make a menu driven program to do the following tasks as per user choice.i. To check for the amicable number (Note: An amicable number are pair of numbers such that one is the sum of proper factors of the other.For example 220 and 284sum of factors of 220: 1+2+4+5+10+11+20+22+44+55+110=284sum of factors of 284:1+2+7+71+142=220ii. To check for the prime number. A number that has only two factors is called a prime number.
- For videos related to java programming
- http://www.youtube.com/user/trushnatej
Related Posts
Continue learning with these related articles

String Methods in Java for ICSE Class 10: 25 Output Questions with Answers
ICSE Class 10 Computer Applications practice on String class methods: length, charAt, indexOf, lastIndexOf, substring, replace, trim, compareTo, equals and more, with 25 board-style output questions and step-by-step answers.

Special Number Programs in Java for ICSE: Armstrong, Spy, Neon, Disarium, Pronic and More
Every special number asked in ICSE Computer Applications – prime, perfect, Armstrong, palindrome, automorphic, neon, spy, Niven, duck, buzz, Disarium, special and pronic numbers – with definitions, examples and one complete Java program that checks them all.

Math Library Methods in Java for ICSE Class 9 (with Outputs)
ICSE Class 9 Computer Applications notes on the Java Math class: sqrt, cbrt, pow, abs, max, min, ceil, floor, round, rint and random, with return types, tricky negative-number outputs and Java expressions for formulas.