Project20question2024

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

PROJECT PROGRAMS - 2024

1. switch case Ques 9/ chapter VII (Area)


2. Function overloading Ques. 16/ chapter 5 (Perimeter)
3. Write a class having two functions HCF( ) and LCM( ) to calculate HCF and LCM of two integers.
4. class program: Ques. 6/ chapter 7 (Population)
5. class program: Ques. 9/ chapter 7 (Employee)
6. Calculations: Ques. 7/ chapter VII (Bank)
7. Using the switch statement, write a menu driven program for the following:
 To print the Floyd’s triangle [Given below]
1
23
456
7 8 9 10
11 12 13 14 15

 To find the sum of the numbers based on value of n.


For example if n=5 then sum=1+12+123+1234+12345
For an incorrect option, an appropriate error message should be
displayed.

8. Write a program in Java to accept a number and check whether it belongs to the Fibonacci
Series (sequence) or not.
9. An Emirp number is a number which is prime backwards and forwards.
Example: 13 is an Emirp number since 13 and 31 are both prime numbers. Write a program to accept a number and
check whether it is an Emirp number or not.

10. Write a menu driven program in Java to provide the following options to generate and print
output based on user’s choice:

 To input a number and check whether it is a NEON number or not


A number is said to be NEON, if sum of all the digits of the square of the number is equal to the number
itself. For
example 9 is a NEON number.
(Workings: Square of 9 = 81. Sum of digits of square: 8 + 1 = 9)

 To print the REPUNIT series: 1, 11, 111, 1111, …. upto 'n' terms

11. An electronic shop has announced the following seasonal discount on purchase of certain items.

Purchase Amount in Rs. Discount on Laptop Discount on Desktop PC

0-25000 0.0% 5.0%

25001-57000 5.0% 7.5%


57001-100000 7.5% 10.0%

More than 100000 10.0% 15.0%

Write a program based on the above criteria to input name, address, amount of purchase, and type
of purchase (L or 1 for Laptop and D or 2 for Desktop) by a customer. Compute and print the net
amount to be paid the customer along with name and address.
[Hint : discount= (discount rate /100) * amount of purchase Net amount= amount of purchase – discount]
12. Write a program in JAVA to find the Prime factors of a number.
Prime factors of a number are those factors, which are prime in nature and by which the number is completely divisible (1
will not be taken as prime number).
Few such numbers are: Prime Factors of 24 are 2, 2, 2, 3 Prime Factors of 6 are 2, 3

13. From an array a[] find the value n using linear search.
14. From an array a[], where the values are arranged in ascending order, find the value of n using
binary search.
15. Arrange the values of a[] in descending order using selection sort technique.
16. Names and total marks of 50 students are stored in two arrays n[] and t[]. Print the list of names
and totals rank wise.
17. Enter a sentence and check for palindrome.
18. From a sentence print the frequencies of uppercase, lowercase, digits and special characters.
19. Convert the uppercase characters to lowercase and vice versa in an entered sentence.
20. Enter a word and print its piglatin form.

--XX--

You might also like