Worksheet Class9 CTS
Worksheet Class9 CTS
Worksheet Class9 CTS
CLASS – 9
SECTION - A
SECTION – B
(NOTE : Solve the following Programs , Write Variable Description table after each program)
Q1) Write a program in java to input the name and basic salary of an employee. Find the gross
pay and net salary of an employee for the following allowances and deduction.
Use meaningful variables:
da(Dearness Allowance) : 25 % of Basic Pay
hra(House Rent Allowance ) : 15 % of Basic Pay.
Pf(Provident Fund) : 10 % of Basic Pay
gross : basic + hra + da.
Net pay : gross - pay.
Q2) a) Write a java program to accept length and breadth of a Rectangle. Find the area and
Perimeter of the rectangle and display the area and perimeter.
b) Write a java program to accept principle , rate and time . Display Simple interest by
using the following formula : si = (p * r * t ) / 100 ;
Q3) Write a menu driven program to calculate :
(a ) Area of square = side * side
(b) Area of rectangle = length * breadth
(c ) Area of circle = p * r2 , where p =22 / 7
Enter ‘c ‘ to calculate area of circle , ‘s’ to calculate area of square and ‘r ‘ to calculate
area of rectangle .
Q4) ‘Sangam Electronics ‘ has announced the following seasonal discounts on purchase of
certain items :
Write a program to input name , amount of purchase and the type of purchase (‘L’ for Laptop
and ‘D’ for desktop ) by a customer . Compute and display the net amount to be paid by a
customer along with his name.
(Net Amount = Amount of purchase - discount).
Q5) Write a program to compute the amount that a customer pays for a taxi that he hires based
on the following conditions :
Input the customers name , the taxi number and the number of kilometers travelled by him.