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

Class 10 Computer Project

The document outlines a project for Class X students at Don Bosco School, Siliguri, focusing on Java programming assignments for the ICSE Board Examination 2025. It includes detailed instructions for project formatting and a list of assignments covering various programming concepts such as number conversion, Fibonacci strings, composite magic numbers, and more. Each assignment requires specific coding tasks, input/output handling, and documentation of the process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Class 10 Computer Project

The document outlines a project for Class X students at Don Bosco School, Siliguri, focusing on Java programming assignments for the ICSE Board Examination 2025. It includes detailed instructions for project formatting and a list of assignments covering various programming concepts such as number conversion, Fibonacci strings, composite magic numbers, and more. Each assignment requires specific coding tasks, input/output handling, and documentation of the process.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

DON BOSCO SCHOOL, SILIGURI – 734001

PROJECT
COMPUTER APPLICATIONS
CLASS - X

Work Specification : Java programs to be solved for ICSE Board Examination


2025.
Materials / Resources required : Computer with BlueJ installed , A4 sheets ruled and plain
sheets for output.
Instructions / Guidelines : Complete the following assignments.

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 :

Convert the Hexadecimal number 1C28 to Decimal


Working: 1*(16^3) + C*(16^2) + 2*(16^1) + 8*(16^0)
i.e. (4096+3072+32+8)=7208

2. A sequence of Fibonacci Strings is generated as follows:

S0 = “a”, S1 = “b”, Sn = S(n-1) + S(n-2) where ‘+’ denotes concatenation. Thus the
sequence is:

a, b, ba, bab, babba, babbabab, ………. n terms.

Design a class FiboString to generate Fibonacci strings. Some of the members of the
class are given below:

Class name : FiboString

Data members/instance variables:

x : to store the first string


y : to store the second string
z : to store the concatenation of the previous two strings
n : to store the number of terms

Member functions/methods:

FiboString() : constructor to assign x=”a”, y=”b”, z=”ba”


void accept() : to accept the number of terms ‘n’
void generate() : to generate and print the fibonacci strings. The sum of (‘+’ i.e.
concatenation) first two strings is the third string. Eg. “a” is first string, “b” is second
string then the third string will be “ba” and fourth will be “bab” and so on.

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.

3. A Composite Magic number is a positive integer which is composite as well as a magic


number.
Composite number:
A composite number is a number that has more than two factors.
For example: 10
Factors are: 1, 2, 5, 10
Magic number:
A magic number is a number in which the eventual sum of the digits is equal to 1
For example: 28=2+8=10=1+0=1
Accept two positive integers m and n, where m is less than n as user input. Display the
number of Composite magic integers that are in the range between m and n (both
inclusive) and output them along with the frequency, in the format specified below.
Test your program with the sample data and some random data:
Example 1:
INPUT:
m = 10
n = 100
OUTPUT:
THE COMPOSITE MAGIC INTEGERS ARE:
10, 28, 46, 55, 64, 82, 91, 100
FREQUENCY OF COMPOSITE MAGIC INTEGERS IS: 8

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:

Class name : Happy


Data members/instance variable :
n : stores the number
Member functions :
Happy( ) : constructor to assign 0 to n
void getnum(int nn) : to assign the parameter value to the number n = nn
int sum_sq_digits(int x) : returns the sum of the square of the digits of the number x,
using the recursive technique
void ishappy( ) : checks if the given number is a happy number by calling the function
sum_sq_digits(int) and displays an appropriate message

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

Word Vowels Consonants


Intelligence 5 7
Plus 1 3
Character 3 6
Is 1 1
Education 5 4

8. Solve the following program.


Write a program to input a word from the user and remove the duplicate characters
present in it.
INPUT– abcabcabc
OUTPUT – abc

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

b) Solve the pattern:


1
0 1
1 0 1
0 1 0 1
1 0 1 0 1

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]

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