ICSE class ix computer practice test

Oops concepts

icse class ix computer practice test

Question 1
A cloth showroom has announced the following festival discounts on the purchase of items, based on the total cost of items purchased

Purchase Discount%
<Rs.2000 5%
Between Rs.2001 & 10000 10%
Between Rs.10001 & 20000 15%
Above Rs.20001 20%

Write a program to input total purchase, compute and display the amount to be paid after availing the discount.

Question 2
Ask the user to enter any number from 1-7, print day of the week based on the input [HINT: If the number is 1 then print Sunday, if it is 2 then print Monday… etc] (Use switch-case only)

Question 3:
Write a program to accept a number given by the user and check and print if the number is odd or even

Question 4:
A library charges fines for books returned late, the fine charges are given below.
First 5 days 40 paise
6 to 10 days 65paise
10 days 80paise
Calculate the total fine by asking the user to enter no. of days.

Watch Java videos


Please enter your comment!
Please enter your name here