10 ProjectNew

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ICSE COMPUTER APPLICATIONS PROJECT -2

1.WAP in java to input the units consumed and display the electricity bill calculated as per following. A
surcharge of Rs. 75.00 is levied if the units consumed exceeds 250. A fixed rental of Rs. 180.00 is charged to all
the consumers. Over an above a Service Tax of 12 ½ % is add-on to the above and an Edu. Cess of 2% on the
Service Tax is charges as extra. Calculate the Bill amount if on the whole a rebate (discount) of 4% is allowed.

2.WAP to check whether a number entered by the user is an Evil number or not. An Evil number is one whose
Binary counterpart has even number of ones. E.g. 10, as the binary of 10 is 1010 which has 2 ones (hence Evil),
whereas numbers that has Odd number of 1’s are called Odious numbers

3.WAP to generate the Tribonacci Series. E.g. 0, 1, 1, 2, 4, 7, 13… A Tribonacci series is one whose every 4th
term is the sum of 1st, 2nd and 3rd terms.

4.WAP to check whether two numbers entered by the user belong to the set of Amicable Pair or not. Two
numbers are said to be Amicable Pair if the sum of factors of the 1st excluding the number is equal to the 2nd
number and the sum of factors of the 2nd number excluding itself is equal to the 1st  E.g. 220 and 284

5.Write a program to check whether the number entered by the user is a UNIQUE INTEGER or not.
A UNIQUE INTEGER is one that has no repetition of digits. i.e. all the digits are distinct and appears only
once. For e.g. 1234, 65234 etc… whereas digits like 1000, 65536, 121 are not.

6.Input 10 nos. in an array and search a given number from within that array using Linear Search technique, and
display whether found or not along with its position.

7.Input 10 nos. in an array and search a given number from within that array using Binary Search technique.

8.Sort an array of 10 elements in Ascending / Descending Order using Selection Sort technique.
Store 5 nos. in array A[ ] and 5 nos. in array B[ ] and merge them into array C [ ]

9.Write a program to create a class which will have the following functions:
int NumFun()                   : to create a single dimensional array of size 50 integers and
return the smallest  integer
int NumFun(int)               : to calculate and return sum of factors, excluding the number, of the number
returned by the above function
int NumFun(int, int)     : to check whether the two results returned by the above functions are same or not
and accordingly display “perfect” or “non-perfect”
void main()                       :  to execute all the above functions accordingly, using the concept of function

10.A class Myseries is declared to find the sum of the following series


sum = 1*y2/1!  +  2*y4/2!  +  3*y6/3!  +  4*y8/4! … till 10 terms

Data members
int        y                        :         integer number
long     sum                   :         integer to store sum
                                               
Member Functions
void getnum( )                         :          to accept the integer ‘y’
void getseries( )                      :          to find the sum of elements of the series
long getpower(int, int)         :          to calculate ‘y’ to the power ‘x’
long getfact(int)                     :          to calculate the factorial of the denominator
void display( )                         :          to display finally the sum of the series

11.Input the complete name of a person and display the initials, e.g. Mohandas Karamchand Gandhi as MKG

12.Input a sentence and convert each word into a Piglatin. E.g. COMPUTER IS FUN becomes
OMPUTERCAY ISAY UNFAY

13.Input a sentence in any random case and capitalize the first and last letter of each word and convert the rest
to lower case
Input a word and generate the following pattern
Input: MATHS
Output:
M
MA
MAT
MATH
MATHS

14.Write a program in Java to accept a line of text from the user and create a new word formed out of the first
letter of each word. After creating the new word reverse it and check whether it is a Palindrome or not.
E.g. If the user enters:  Mangoes Are Delivered After Midnight
Output: MADAM
Reverse: MADAM
Yes, it is a Palindrome
E.g. If the user enters: A Brick In The Wall
Output: ABITW
Reverse: WTIBA
No, it is not a Palindrome

14. Input a string along with an encoding factor and write a cryptography program code to encrypt the data. E.g.
Input word is “APPLE” and Encoding factor is 3 then each letter gets encoded by a factor of 3 by adding it to its
ASCII equivalent resulting in “DSSOH”

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

You might also like