0% found this document useful (0 votes)
44 views

10 Computer Project 2024-25

Uploaded by

priyanka ms
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

10 Computer Project 2024-25

Uploaded by

priyanka ms
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ACADEMIC PROJECT 2024-25

COMPUTER APPLICATIONS
CLASS: X Date of Submission: 30-09-2024

Project Work:
Students are required to write a record on Java programs.
Each program should be written using Variable descriptions,
Mnemonic codes and output.
Note: Flow-Charts and Algorithms are not required.

Java Programs:
1. Design a class to overload a function SumSeries() as follows:
i) Void SumSeries(int n, double x)- with one integer argument and one double
argument to find and display the sum of the series given below:
𝒙 𝒙 𝒙 𝒙 𝒙
S= + + + + … … … . 𝒕𝒐 𝒏 𝒕𝒆𝒓𝒎𝒔
𝟏 𝟐 𝟑 𝟒 𝟓
ii) Void SumSeries()- to find and display the sum of the following series:
S=1+(1 X 2)+(1 X 2 X 3)+…………+(1 X 2 X 3……….X 20)
(Ref. Page no.106, Program 5.12)

2. Write a program to accept a two-digit number. Add the sum of its digits to the
product of its digits. If the value is equal to the input number, display the message
“Special 2-digit number”; otherwise, display the message “Not a Special 2-digit
number”. (Ref. Page no.171, Program 8.11)

3. Zen Computer is a seller of personal computers. The staff works on a commission


basis. At the end of each month, each sales person’s commission is calculated
according to the table listed below. The staff is also paid an advance amount Rs.
1000 every month. When the sales commission is calculated, the advance amount is
subtracted from the commission. If any salesperson’s commission is less than the
amount, he or she must pay back the difference. (Ref. Page no.182, Program 8.20)
Write a program in java to compute the commission at the end of each month.

Total Sales (Current month) Commission Rate


Less than Rs.20,000 Nil
Rs. 20,000- Rs.39,999 3%
Rs. 40,000 – Rs. 59,999 5%
Rs. 60,000 – Rs. 79,999 8%
Rs. 80,000 or more 10%

4. Write a program to accept a long integer and check if it is an Armstrong


number. (Ref. Page no.232, Program 9.43)

5. Write a program to check whether a number is Spy number or not.


[Hint:A number is said to be a Spy number if the sum of all the digits is equal to
the product of all the digits] (Ref. Page no.233, Program 9.44)

6. Define a class BankAccount as described below:


Data members/Instance variables:
Holders name: to store the name of the account holder
accountNumber: to store the account number
balanceAmount: to store the balance amount
Member Methods:
i) A constructor to intialise the data members. Intialise the balance Amount
with the balance of rs.100 on creation of the amount.
ii) To deposit money into account.
iii) To withdraw money from the account. Ensure that there is enough
balance before withdrawal.
Write a main method to create an object of the class and call the above member
methods. (Ref. Page no.305, Program 11.9)

7. Write a program that shows the java implementation of the Selection sort algorithm.
(Ref. Page no. 379)
8. Write a menu driven program to display the pattern as per user’s choice:
i) write a program to display the following pattern.
(Ref. Page no.279, Program 10.18)
@@@@@@@@7
@@@@@@@6
@@@@@5
@@@@4
@@@3
@@2
@1
0

ii) Display the following pattern using iteration (looping statement).


(Ref. Page no.473)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

iii) Write a program to display the given pattern for a string input.
(Ref. Page no.420, Program 15.24)
Sample Input: SCHOOL
Sample Output:
SCHOOL
SCHOO
SCHO
SCH
SC
S

9. Write a program to accept a string and display:


i. The number of lowercase characters.
ii. The number of uppercase characters
iii. The number of special characters
iv. The number of digits present in the string
(Ref. Page no. 423 Program- 15.27)
10. Write a program in Java to accept a string in lowercase and change the first letter of
every word to uppercase. Display the new string.
Sample Input: we are in cyber world
Sample Output: We Are In Cyber World (Ref. Page no. 322 Program- 12.13)

11.Define a class called FruitJuice with the following description:


Instance variable:
int product_code: stores the product code number
String flavor: stores the flavor juice.
String pack_type: stores the type of packaging
int pack_size: stores the package size
int product_price: stores the price of the product
Member Method
FruitJuice()- default constructor to intialise integer data member to Zero and string
data members to “ ”.
Void input() – to input and store the product code, flavor, pack type, pack size and
product price.
Void discount()- to reduce the product price by 10.
Void display()- to display the product code, flavor, pack type, pack size and product
price. (Ref. Page no. 332 Program- 12.20)

12.Write a program in java to input a two-dimensional array of size n(rows=columns=n)


and perform the following tasks:
i) Print the array in matrix form (n X n).
ii) Compute and print the sum of the elements at the left diagonal.
iii) Compute and print the sum of the elements at the right diagonal.
(Ref. Page no. 391 Program- 14.22)

13. Write a program to accept a word and convert into lowercase if it is in uppercase, and
display the new word by replacing only the vowels with the character following it.
Sample input: computer
Sample output: cpmpvtfr (Ref. Page no. 429 Program- 15.32)

14.Write a program to assign 10 country names to an array of strings. Sort them in


ascending order using Bubble Sort technique. (Ref. Page no. 422 Program- 15.36)
15.Write a program using switch case to find the volume of a cube, a sphere and a
cuboid. For an incorrect choice, an appropriate error message should be displayed.
[Hint: Volume of a cube = s*s*s
Volume of a Sphere= (4/3)*∏*r*r*r (∏=22/7)
Volume of a cuboid= l*b*h ]

16. Write a program to input two words and check whether they are Anagrams or not.
[Ex: CAT and ACT are Anagrams]

17.Define class to accept a 3 digit number and check whether it is a duck number or
not.
[Hint: A number is a duck number if it has Zero in it
Ex 1: Input : 2083
Output: Invalid
Ex 2: Input : 103
Output: Duck number]

18. Define a class to accept the gmail id and check for its validity.
A gmail id is valid only if it has:
➢ @
➢ .(dot)
➢ gmail
➢ Com
Example: icse2024@gmail.com is a valid gmail id.

19. Define a class to accept values in integer array of size 10. Find sum of one digit number
and sum of two digit numbers entered. Display them separately.
Ex: Input: a[] = {2,12,4,9,18,25,3,32,20,1}
Output: Sum of one digit numbers: 2+4+9+3+1=19
Sum of two digit numbers: 12+18+25+32+20=107

20. i) Write a program to print the square of each digit of the given number.
[Ex: n=4329
Output- 3.0
1.414213562
1.732050808
2.0]
ii) Write a program to check whether the number is a lead number. A lead number is the
one whose sum of even digits are equal to sum of odd digits.
[Ex: 3669 odd digits sum= 3+9=12
Even digit sum= 6+6=12
3669 is a lead number.]

******************************************************************

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy