Worksheet 1
Worksheet 1
J.P.Nagar, Bengaluru – 78
SUBJECT: COMPUTER APPLICATIONS
STD X ICSE 2025 – 26
ASSIGNMENT WORKSHEET – 1
SUBMISSION DATE: 19.05.2025
NOTE: All the assignments given for the academic year 2025 – 26 to be written and
maintained in a separate long size 200 pages ruled notebook.
1. Write a Java expression to find the sum of square root of P and cube root of Q.
2. Evaluate the given expression and write the output when a=5 and b=7.
a*=--a + b++ - --b;
System.out.println ("a="+a+"\nb="+b);
3. Rewrite the following if else if statements using switch case statements.
if (x=='a' || x=='A')
System.out.println("Amazon");
else if (x=='f' || x=='F')
System.out.println("Flipkart");
else
System.out.println ("Invalid code");
4. Write the output of the following mathematical library methods.
System.out.println (Math.max (Math.min (-5, -10), -100));
System.out.println (Math.abs (Math.ceil (-5.8)));
5. Mention the return datatype and the value stored in the variables r1, r2, r3 and r4.
int x=5;
char y='a';
_______ r1 = x+y;
_______ r2 =(char)(x+y);
_______ r3 = ++y;
_______ r4 = y+=2;
6. A courier company charges for an ‘Ordinary’ mail and an ‘Express’ mail based on the
weight of the parcel as per the tariff given below:
Weight of parcel Charges on Charges on
(in gms) Ordinary mail Express mail
upto 100 gms `50 `80
101 – 500 gms `40 per 100 gms `70 per 100 gms
501 and above `35 per 100 gms `65 per 100 gms
Write a java program to accept the weight of a parcel and type of mail (1 for Ordinary and 2
for Express) using Scanner class method and calculate and print the charges under each
category.