Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Grade 9 Project - 2024-25

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

COMPUTER APPLICATIONS PROJECT

TERM 1- 2024- 2025


Topic: - JAVA PROGRAMMING

Instructions:

 Cover Page (including the title as Computer Applications Project, Academic


Year, Student Name, Grade – Div, Roll No.)

Sno Programs Page no


1 Program 1 1
2 Program 2 3

 Index Page (List of program titles)


 Acknowledgement
 Format for writing the program:
 Question
 Program
 Output
 Variable Description Box

Submission Date: 27th,August,2024

Programs:
1. Write a program to input a two-digit number and check if it is a
Nest number or not. A number is said to be a ‘Nest Number’ if the number
contains at least one digit which is zero.
Sample input: 20
Sample output: It is a Nest Number

2. Write a program that accepts three integers as parameters and find the
middle value of the three.
Sample input: 5, 1, 8
Sample output: 5
3. Write a program to input two numbers. Display the numbers after swapping
them by without using a third variable.
Sample Input x=40, y= 50 ;
Sample Output: x=50, y= 40 ;

4. Write a menu driven program in Java to accept a number and perform the
following operations depending on the user's choice:
 Entered number is a Buzz number or not.
 Entered number is even or odd.
 Entered number is positive or negative.
Note: A Buzz number is a number which is either divisible by 7 or has 7 in
its unit's place.

5. Input two numbers a, b. Divide a by b, and store in c, provided b is not


equal to 0. If b =0, then store 1 in c. Use ternary operator.

6. Write a program that prompts the user to enter an integer and determines
whether it is divisible by 5 and 10, it is divisible by 5 or 10, and whether it
is divisible by 5 or 10, but not both. Display the result accordingly.

7. Write a program that checks whether a given 2-digit number is a


palindrome number or not.
Sample input: 55
Sample output: The given number is palindrome.
Sample input: 46
Sample output: The given number is not palindrome..

8. In a library, fine is charged on the number of days a book is returned late.


By taking the input of days late, print the late fine applicable.
Number of days late(d) Fine(₹)
Up to 5 10
Next 5 days 5 for each day
Next 5 days 7 for each day
Seize the caution money if a book is kept beyond 15 days.[No fine
calculation required.]

9. A student will not be allowed to sit in exam if his/her attendance is less


than 75%. Take following input from user :
 Number of classes held.
 Number of classes attended.
Print the percentage of class attended and if the student is allowed to sit in
exam or not.

10. Write a program to enter a number. If the number is positive even


number display three succeeding even numbers. If the number is negative
odd, display three succeeding odd numbers, otherwise display number is
neither positive even or negative odd.
Sample input: -21
Output: -23,-25,-27

11. Write program to accept the number of days and display it after
converting into number of years, number of months and number of days.

12. Given below is a hypothetical table showing rate of income tax for an
India citizen, who is below or up to 60 years.
Taxable income (TI) in Rs. Income Tax in Rs.
Up to Rs. 2,50,000 Nil
More than Rs. 2,50,000 and less (TI - 1,60,000) * 10%
than or equal to Rs. 5,00,000
More than Rs. 5,00,000 and less (TI - 5,00,000) * 20% + 34,000
than or equal to Rs. 10,00,000
More than Rs. 10,00,000 (TI - 10,00,000) * 30% + 94,000

Write a program to input the name, age, and taxable income of a person. If
the age is more than 60 years, then display the message "Wrong Category".
If the age is less than or equal to 60 years then compute and display the
income tax payable along with the name of taxpayer, as per the table given
above.

13. A courier company charges differently for “ORDINARY” Booking


and “EXPRESS” Booking based on the weight of the parcel as per the tariff
given up:
Weight Ordinary Booking Express
booking
up to 100 gm Rs.80 Rs.100
101 gm to 500 gm Rs.150 Rs.200
501 gm to 1000 gm Rs.210 Rs.250
more than 1000 gm Rs.250 Rs.300

Write a program to input weight of a parcel and type of booking (‘O’ for
ordinary and ’E ‘ for Express ). Calculate and print the charges accordingly.

14. Write a program to input two unequal positive numbers and check
whether They are perfect square numbers or not. If the user enters a
negative number then the program displays the message 'Square root of a
negative number can't be determined'.
Sample Input: 81, 100
Sample Output: They are perfect square numbers.
Sample Input: 225, 99
Sample Output: 225 is a perfect square number.
99 is not a perfect square number.

15. Write a program to input year and check whether it is:


(a) a Leap year
(b) a Century Leap year
(c) a Century year but not Leap year Century years are NOT leap years
UNLESS they can be evenly divided by 400.
(For example, 1700, 1800, and 1900 were not leap years, but 1600 and
2000, which are divisible by 400, were.) Sample Input: 2000 Sample
Output: It is a Century Leap Year

*****

You might also like