Assignmnt For Class IX 2024 - 2025

 Practical Assignment

2024-2025

1)   Write a Java program to calculate and display the volume of the cylinder (volume = πr2h)

2) Write a program in Java that uses 'input using initialisation' to calculate the Simple Interest and the Total Amount with the given values:
i. Principle Amount = Rs. 20000
ii. Rate = 8.9%
iii. Time = 3 years

3) Write a Java program to print whether the number is positive or negative, using the “if else” statement.

4) Write a program in Java to accept three numbers and check whether they are Pythagorean Triplet or not. The program must display the message accordingly. [Hint: h2=p2+b2]

5)  Write a Java program to input two numbers and swap their values without using a third variable.

6) Write a Java program to check whether the number entered is divisible by 3 as well as 5. Otherwise, decide:

            (a) Is the number divisible by 3 and not by 5?

(b) Is the number divisible by 5 and not by 3?


(c) Is the number neither divisible by 3 nor by 5?

            The program displays the message accordingly.

7) A cloth showroom has announced the following festival discounts on the purchase of items, based on the total cost of the items purchased: 

        Write a program to input the total cost and display the amount to be paid by the customer after       

        availing the discount.

8) Mayur Transport Company charges for parcels as per the following tariff:
WeightCharges
Upto 10 Kg.Rs. 30 per Kg.
For the next 20 Kg.Rs. 20 per Kg.
Above 30 Kg.Rs. 15 per Kg.

 Write a program in Java to calculate the charge for a parcel, taking the weight of the parcel as an input.

9) Write a Java program to check whether the entered character is a vowel or not using switch case statement.

10) Using the switch statement in Java, write a program to display the colour of the spectrum (VIBGYOR) according to the user's choice.