Class 10 Computer Project
Class 10 Computer Project
PROJECT
COMPUTER APPLICATIONS
CLASS - X
1. First page of the Project file will be the cover page. Write your name, class, section,
subject and to whom it is to be submitted
2. Acknowledgement
3. Index
4. For each assignment, arrange sheets having:
a) Question / Problem statement
b) Coding
c) Input / Output Screenshot
d) Variable Description
5. Conclusion
6. Bibliography / References
Assignments:
1. Write a Program in Java to input a number in Hexadecimal number system and convert it
into its equivalent number in the Decimal number system.
Note: Hexadecimal Number system is a number system which can represent a number in
any other number system in terms of digits ranging from 0 to 9 and then A – F only. This
number system consists of only sixteen basic digits i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C,
D, E and F. Here 10 is represented as A, 11 as B and so on till 15 which is represented as
F.
Example :
S0 = “a”, S1 = “b”, Sn = S(n-1) + S(n-2) where ‘+’ denotes concatenation. Thus the
sequence is:
Design a class FiboString to generate Fibonacci strings. Some of the members of the
class are given below:
Member functions/methods:
Specify the class FiboString, giving details of the constructor(), void accept() and void
generate(). Define the main() function to create an object and call the functions
accordingly to enable the task.
4. Write a program to input a natural number less than 1000 and display it in words.
Sample Data:
Input: 59
Output: FIFTY NINE
Input: 17001
Output: OUT OF RANGE
Input: 119
Output: ONE HUNDRED AND NINETEEN
Input: 800
Output: EIGHT HUNDRED
5. Write a program to input a number. Count and print the frequency of each digit present in
that number. The output should be given as:
Sample Input: 44514621
Sample Output:
=====================
Digit Frequency
=====================
1 2
2 1
4 3
5 1
6 1
6. A happy number is a number in which the eventual sum of the square of the digits of the
number is equal to 1.
Example:
28 = ( 2 )^2 + ( 8 )^2 = 4 + 64 = 68
68 = ( 6 )^2 + ( 8 )^2 = 36 + 64 = 100
100 = ( 1 )^2 + ( 0 )^2 + ( 0 )^2= 1 + 0 + 0 = 1
Hence, 28 is a happy number.
Example: 12 = ( 1 )^2 + ( 2 )^2 = 1 + 4 = 5
Hence, 12 is not a happy number.
Design a class happy to check if a given number is a happy number. Some of the
members of the class are given below:
Also define a main( ) function to create an object and call the methods to check for happy
number.
7. Write a program to accept a sentence which may be terminated by either ‘.’ or ‘?’ only.
The words are to be separated by a single blank space. Print an error message if the input
does not terminate with ‘.’ or ‘?’. You can assume that no word in the sentence exceeds
15 characters, so that you get a proper formatted output. Perform the following tasks:
a) Convert the first letter of each word into uppercase.
b) Find the number of vowels and consonants in each word and display them with
proper headings along with the words.
Test your program with the following inputs.
Example 1
INPUT: Intelligence plus character is education.
OUTPUT:
Intelligence Plus Character Is Education
INPUT–Mississippi
OUTPUT – Misp
9. Write a program to enter a 2D array of size n*n. If it is Upper Triangular matrix, then
check whether all the major diagonal elements are Kaprekar numbers or not.
[Note: If all the elements below the major diagonal are zero, then the matrix is considered
as Upper Triangular matrix.
The square of a number is divided into two parts in such a way that sum of the two parts
is equal to the original number.
Example: 45, 297 etc.
452 = 2025 = 20+25=45
2972=88209 = 88+209=297]
10. Write a menu driven program using switch case to solve the following patterns:
a) Solve the pattern:
9
8 9 8
7 8 9 8 7
6 7 8 9 8 7 6
5 6 7 8 9 8 7 6 5
6 7 8 9 8 7 6
7 8 9 8 7
8 9 8
9
11. Write a program to enter 8 elements in an array that must contain at least 2 Disarium
numbers. Interchange the largest and smallest Disarium number and print the modified
array.
[Note: A number is said to be Disarium number when the sum of its digit raised to the
power of their respective positions is equal to the number itself.
Example: 89, 135 etc.
Working: 89=81+92=8+81=89 135=11+32+53=1+9+125=135]
12. Write a program to enter the name of 10 cities along with countries they belong to. Sort
the cities in ascending order. Then search for a specific city name in the sorted array
using binary search technique and print the respective country that city belongs to.
[Note: Consider 10 different cities which belong to 10 different countries]