CARMEL SCHOOL, GIRIDIH
ICSE PROJECT WORK 2022-23
1. W.A.P. in blue j to accept a string in mixed case . Arrange all the alphabets of the string
in such a way that all the lower case characters are followed by the upper case characters.
For e.g. :
String input : ComPUTer
Sample output : omerCPUT
2. W.A.P. in bluej to accept a string . frame a word by taking the first character of each
word and check whether the new word is a palindrome or not.
3. W.A.P. in bluej to accept a string , which includes some special characters like
punctuation mark viz. apostrophe(‘), full stop(.),comma(,), semicolon(;) etc. and display
the string in reversed order without using punctuation mark.
Sample input : ‘emotions’, controlled , ‘controlled’ and ‘directed to work’ show the
greatness of swami Vivekananda.
Output : Vivekananda swami of greatness the show work to directed and controlled
emotions.
4. Write a program in bluej to input natural numbers between 1 to 1000 and then output it in
words :
For e.g. :
Input : 29
Output : two Nine
5. Write a program in bluej to store 10 integers in a single dimension array . arrange them
in descending order. Ask the user to input one more number and store it at proper
position.
6. W.A.P. in bluej to store n integers (n>0) in a S.D.A. and store only palindrome numbers
in another array. Display the new array.
7. Write a method that takes a number in decimal number system as argument and returns
its binary equivalent.
8. Write a method in bluej that takes a binary equivalent number as argument and returns its
decimal equivalent.
9. A perfect square is an integer which is the square of another integer. For example, 4, 9,16 ..
are perfect squares. Design a Class Perfect with the following description:
Class name : Perfect
Data members/instance variables
n : stores an integer number
Member functions:
Perfect( ) : default constructor
Perfect(int) : parameterized constructor to assign a
value to ‘n’
void perfect_sq() : to display the first 5 perfect squares larger than ‘n’ (if n =
15, the next 3perfect squares are 16, 25, 36)
void sum_of() : to display all combinations of
consecutive integers whose sum is equal to n. ( the number n = 15 can be
expressed as
12345
456
78
Specify the class Perfect giving details of the constructors, void perfect_sq( ) and
void sum_of(). Also define the main function to create an object and call methods
accordingly to enable the task.
10. In “Piglatin” a word such as KING is replaced by INGKAY , while TROUBLE
becomes OUBLETRAY and so on . The first vowel of the original word becomes
the start of the translation, any preceding letters being shifted towards the end and
followed by AY.
Words that begin with a vowel or which do not contain any vowel are left
unchanged.
Design a class Piglatin using the description of the data members and member
functions given below:
Class name : Piglatin
Data members /instance variables :
Txt : to store a word
len : to store the length
Member functions :
Piglatin( ) : constructor to initialize the data mrmbers
void readstring( ) : to accept the word input in UPPER CASE
void convert ( ) : converts the word into its piglatin form and
displays the word (changed or unchanged)
void consonant( ) : counts and displays the number of consonants present in the given
word.
Specify the class Piglatin giving the details of the constructor, void readstring( ),
void convert( ) and void consonant( ). Also define the main function to create an
object and call methods accordingly to enable the task.
11. Write a program in bluej to input 100 numbers through the keyboard using scanner class and
display only those numbers which are palindrome . your program must validate for integer
numbers.
12. Write a method in bluej that takes two integers as argument and returns its HCF using
division method.
13. Write a program to input the date dd/mm/yyyy format and check whether given date is valid
or not. If date is valid display in mm/dd/yyyy format.
14. Write a program in blue j to delete a number from a SDA.
15. Write a program in blue j to input a string and display the ASCII code of each character.
16. A company announces and increment of their employees on seniority basis as per the given
condition :
Age Increment
56 years and above 20% of basic
Above 45 and below 56 15% of basic
Upto 45 10 % of basic
Write a program to find new basic by using the following class specifications :
Class : Increment
Data members :
String name. double basic , int age
Member methods :
Void getdata( ) : to accept name , basic and age
Void calc( ) : to find increment and update basic
Void display ( ) : to display age and basic in the following format :
Age Basic
------- --------
Write main method to create object and call all the methods defined above.
17. Define a class Recurring patterns and define methods in it which will print the following
patterns :
a) The method takes an integer argument ‘n’ and print the following pattern. Shown for
n=4.
a
aa
aaa
aaaa
aaa
aa
a
b) The method takes an integer argument ‘n’ and print the following pattern. Shown for n=4.
1
121
12321
1234321
12321
121
1
c) The method takes an integer argument ‘n’ and print the following pattern. Shown for n=4.
abcdcba
abc cba
ab ba
a a
ab ba
abc cba
abcdcba
18. There are two single subscripted variable A and B. Array A contains integer numbers in
ascending order and array b contains in descending order. Write a program in bluej to merge
these array into the third array C in such a way that resultant array will contain the number in
ascending order. Without using either of the sorting technique.
19. Write a program in bluej to input a string and remove all the common characters from it.
20.The International Mobile Station Equipment Identity or IMEI is a number, usually unique, to
identify mobile phones, as well as some satellite phones. It is usually found printed inside the battery
compartment of the phone.
The IMEI number is used by a GSM network to identify valid devices and therefore can be used for stopping a
stolen phone from accessing that network.
The IMEI (15 decimal digits: 14 digits plus a check digit) includes information on the origin, model, and serial
number of the device.
The IMEI is validated in three steps:
1. Starting from the right, double every other digit (e.g., 7 becomes 14).
2. Sum the digits (e.g., 14 → 1 + 4).
3. Check if the sum is divisible by 10.
For Example:
If input is IMEI = 490154203237518
Since, 60 is divisible by 10, hence the given IMEI number is Valid.
Design a program to accept a fifteen digit number from the user and check whether it is a valid IMEI number
or not. For an invalid input, display an appropriate message.