0% found this document useful (0 votes)
107 views5 pages

Class 10 Computer Project Guidelines

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)
107 views5 pages

Class 10 Computer Project Guidelines

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

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]

Common questions

Powered by AI

The Fibonacci string generation in the FiboString class differs from traditional numeric Fibonacci sequence generation in that it concatenates strings instead of adding numbers. Traditional Fibonacci series generates numbers where each number is the sum of the two preceding ones. In contrast, the FiboString class starts with two initial strings, "a" and "b", and subsequent strings are formed by concatenating the previous two strings. This results in the sequence: a, b, ba, bab, babba, etc. This string-based approach does not involve arithmetic operations but relies on string operations such as concatenation .

The algorithm for removing duplicate characters from a given word iterates through the string while maintaining a data structure such as a Set to track already seen characters. As it processes each character, it checks if the character is in the set. If not, it adds the character to the result string and registers it in the set to prevent future duplication. This approach ensures that only the first occurrence of each character is retained, while duplicates are effectively ignored .

The switch case structure facilitates pattern generation by allowing the user to select from multiple predefined patterns, each case in the structure handling a different pattern. Upon the user making a selection, the corresponding case executes the code block designed to generate and display the pattern. This structure simplifies managing multiple patterns within a single program, enhances readability, and enables modular design by directing control flow clearly through cases specific to each pattern .

When generating a program to convert numbers less than 1000 into words, it is crucial to handle numbers across all possible ranges and their linguistic representations carefully. The program must account for special cases like teens and round numbers such as tens or hundreds and ensure correct usage of conjunctions like 'and'. It should also handle errors like inputting numbers greater than 999, producing an "OUT OF RANGE" message. These considerations demand detailed condition handling and string generation logic to ensure linguistic accuracy .

The program uses a string manipulation technique where each word in a sentence is processed to convert its first letter to uppercase. This is typically done by tokenizing the sentence into words, then capitalizing the first letter of each word, and finally concatenating the words back into a complete sentence. Such an approach ensures proper formatting with each word having an uppercase initial .

The `Happy` class determines whether a number is a happy number by calculating the sum of the squares of its digits recursively until the number becomes 1 or loops endlessly in a cycle that does not include 1. It defines a method `sum_sq_digits(int x)` to compute this sum. The `ishappy()` method calls `sum_sq_digits(int)` repeatedly. If the result converges to 1, the number is classified as a happy number, otherwise, it is not .

Implementing a binary search on a sorted list of city names involves initially sorting the list in ascending order. The binary search algorithm then proceeds by repeatedly dividing the search interval in half. It starts with an interval covering the whole array and compares the middle element to the target city name. If the target matches the middle element, the search is successful. If the target is less, the interval is narrowed to the lower half; if the target is more, it narrows to the upper half. This process is repeated until the target name is found or the interval is empty .

The Java programming assignments aim to reinforce students' understanding of fundamental programming concepts such as data manipulation, recursion, class-object relationships, and string operations. They provide practical experience in algorithm design and problem-solving, encourage familiarity with BlueJ IDE for compiling and debugging Java code, and develop students' ability to document code effectively with input/output screenshots and variable descriptions. These assignments collectively strive to build competency in coding and analytical thinking, foundational for further learning in computer science .

The problem is resolved by first checking if the given 2D array matrix is Upper Triangular, which means all elements below the major diagonal are zero. If this condition holds, the program then checks if each major diagonal element is a Kaprekar number. A number is Kaprekar if, when squared and split into two parts, the sum of these parts is equal to the original number. These checks involve verifying the properties of the number according to the Kaprekar definition through iterative or recursive computations .

A number must meet two criteria to be classified as a 'Composite Magic Number': it must be a composite number, meaning it has more than two factors, and it must also be a magic number, where the eventual sum of its digits equals 1. For example, the number 28 is a composite number with factors 1, 2, 4, 7, 14, 28, and it is a magic number because the sum of its digits reduces to 1 (2 + 8 = 10, 1 + 0 = 1).

You might also like