ICSE Computer Project, 2014
COMPUTER PROJECT FOR STD - X, ICSE 2014 - 15
- 35 Java Programs from conditional branching and decision making, iterations, single dimensional arrays, library functions using String and Math classes, user defined functions.
- Programs are to be written in Java with Blue-J as the environment.
- You are expected to submit the complete project work (incomplete work will not be accepted).
- You need to furnish the following as your project contents
1. Cover Page
2. Source Code
3. Sample input and output
- Variable Description is not compulsory
- All projects must be printed in B/W or colored printouts, handwritten assignments will not be accepted.
- Avoid usage of unwanted illustrations and decorations.
- The Cover page must contain your name, class, section and roll number,
- Page 3 must be the Contents page and the Introduction page follows the contents page starting at page # 1
- All the pages must be numbered.
- You are supposed to submit your work in Spiral Bound
- Date of submission 5th December 2014
- 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
- int y : integer number for numerator variable
- double sum : to store sum
- 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
- Define a class with the following specifications:
int checkArmstrong (int) : to check a number and return 1 if the number is Armstrong otherwise return 0.
void checkPrime(int, int ) : to display all prime numbers within the range entered by the user.
void main( ) : To input number and display the message depending upon the value returned by checkArmstrong(int) and to input range required for CheckPrime(int, int).
- 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
- Create overloaded methods named void calc_volume ( ), that has been overloaded to perform the following functions
Volume of Sphere
Volume of Cylinder
Volume of Cone
Write a menu driven program in Java to display the above 3 menus and execute the overloaded methods and display the volume in the respective functions,
calc_volume (double) for sphere,
calc_volume (double, double) for cylinder and
calc_volume (float, float) for cone.
- Store 5 nos. in array A[ ] and 5 nos. in array B[ ] and merge them into array C [ ]
- Sort an array of 10 elements in Ascending / Descending Order using Selection Sort technique.
- Sort an array of 10 elements in Ascending / Descending Order using Bubble Sort technique.
- Input 10 nos. in an array and search a given number from within that array using Binary Search technique.
- 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.
- WAP to input two numbers and print the HCF (GCD) and LCM of the two numbers.
- WAP to input a number and check whether it is a Zero Free number or not, A Zero Free number is one which does not contain any digit as Zero. (Hint: 123)
- Write a program to check whether the number entered by the user is a Unique number or not. A Unique number 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.
- 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
- 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.
- Input a number and check whether the 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
- Input a number and check whether it is an Automorphic number or not.(Hint: 25 is an Automorphic number because 252 = 625 in which the number of digits in the original number (i.e. 25) before squaring is identical to that many number of digits from the LHS of the squared number (i.e. 625).
- Input any number and check if it is a Palindrome Number or not. A number that reads the same from both the ends (Hint: 121 = 121)
- Input any number and check if it is a Perfect number or not. Sum of factors excluding the number is equal to the number. (Hint: 6 = 1 + 2 + 3)
- Input any number and check if it is an Armstrong (Narcissistic) number or not. Sum of cubes of digits is equal to the number. (Hint: 153 = 13 + 53 + 33)
- Input any number and check if it is a Krishnamurthy number or not. Sum of factorial of digits is equal to the number. (Hint: 145 = 1! + 4! + 5!)
- Write a menu driven program to input/assign/store 2 numbers and perform the following mathematical operations on the two variables as given below in the menu…
- A cab driver charges Rs. 15.00 on the first meter (km). he charges an extra of Rs. 22.00 on the next 5 kms. Anything beyond that is charged at Rs. 2.50 per km. WAP to input the distance covered and calculate the cab charges.
- JSEB charges their consumer according to the tariff chart given below,
Units Consumed Charges
Up to 50 units Free
51 – 100 0.75p
101 – 250 1.25p
251 – 500 2.50p
Above 500 3.00p 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 exceed 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 Educational 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.
- WAP to enter the co-efficient of Quadratic Equation ax2+bx+c=0 and find out the roots, Roots of a Quadratic Equation and mention whether the Roots are Real, Equal or Imaginary
- WAP to input three nos. and print the 1st largest, 2nd largest and the 3rd largest of them do not use arrays and sorting.
- WAP to input the total amount in Rupees and find out the denominations in least possible numbers of all possible currency notes (i.e. Rs. 1000/- , Rs. 500/- , Rs. 100/- , Rs. 50/- , Rs. 20/- , Rs. 10/- , Rs. 5/- , Rs. 2/- , Rs. 1/- for the amount entered by the user.
- Write a function named int sort_digit (int) in Java to pass an integer number as argument that might contain any number of digits, and sort each individual digits of the number in ascending order and return the same, (without implementing arrays).
g Sample Input: 4987
Sample Output: 4789
- Input a sentence and display the total no. of letters, digits, uppercase letters, lowercase letters, spaces, special characters, vowels and consonants are present in it.
- Input a sentence and reverse each word without reversing the sequence of the words. E.g. COMPUTER IS FUN, as RETUPMOC SI NUF
- Input a sentence and convert each word into a Piglatin. E.g. COMPUTER IS FUN becomes OMPUTERCAY ISAY UNFAY
- Input a sentence and display only the Palindrome words, like NITIN ARORA PLAYS FOOTBALL, gives NITIN, ARORA
- Input names of ten capital cities and arrange them in Lexicographic order and redisplay them.
- Input a word and generate the following pattern
- 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”
- Write a program to input an integer type number N and print all possible sets of consecutive natural numbers that adds up to N, Say the number entered by user is 15 then the output is
1, 2, 3, 4, 5
4, 5, 6