0% found this document useful (0 votes)
6 views2 pages

Java Programs for Class 9 Students

The document contains a series of programming exercises for Class 9 students, focusing on Java programming concepts. It includes tasks such as calculating simple interest, printing personal details, converting time units, and performing geometric calculations. Each question requires students to write Java programs that demonstrate their understanding of variables, calculations, and output formatting.

Uploaded by

tanviverma0020
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Java Programs for Class 9 Students

The document contains a series of programming exercises for Class 9 students, focusing on Java programming concepts. It includes tasks such as calculating simple interest, printing personal details, converting time units, and performing geometric calculations. Each question requires students to write Java programs that demonstrate their understanding of variables, calculations, and output formatting.

Uploaded by

tanviverma0020
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class 9

Question 1. Write a program in Java to calculate the Simple Interest with the given
values:
i. Principle Amount = Rs.100000
ii. Rate = 11.5%
iii. Time = 5 years
Display the following output:
i. Simple interest
ii. Value of the difference between the simple Interest and Principle Amount.

Question 2. Write a program to print your Roll Number, Name, Class & Section,
School Name and Address with proper message.

Question 3. Write a program to assign roll number, name and 3 subject marks to
corresponding variables. Calculate total of 3 subject marks and average. Print all details
with proper message.

Question 4. Write a program in Java to assign the value of seconds to a variable and
converts them into the corresponding number of hours, minutes and seconds. Print all
details with proper message.
A sample output is shown below:
Total Seconds: 5000
Output:
1 Hour(s) 23 Minute(s) 20 Second(s)

Question 5. Write a program in Java to assign radius of circle. Calculate and print
Area of circle and circumference of circle with proper message.

Question 6. Write a program in Java to assign length and breadth of a rectangle.


Calculate and print area and perimeter of rectangle with proper message.

Question 7. Write a program to calculate the bill amount for the following:
Item Name Quantity Price per piece
Pencil 5 12
Eraser 5 6
Sharpener 5 7
Pen 5 54
Print your output according to given format:
Item Name Quantity Price per piece Amount
Pencil 5 12 60
Eraser 5 6 30
Sharpener 5 7 35
Pen 5 54 270
Total Paid Amount is: 395
Question 8. Write a program in Java to assign the value of u, a and t, compute the
final velocity of a vehicle using the following formula:
v = u + at
where, u = initial velocity, a = acceleration and t = time.

Question 9. Write a program to assign distance in meter and convert it to km. Suppose
the traveling cost of 1 km using a Vehicle is Rs. 12, then print the total cost of travelling with
proper message.

Question 10. Write a program to assign base and height of triangle. Calculate and print
area of triangle with proper message.

You might also like