Project Work: Class 10
Project Work: Class 10
COMPUTER APPLICATION
SUBJECT :
Materials /
Computer with BlueJ and JDK installed, approx.…20 foolscaps/practical
Resources sheet, textbook, Ring File.
Required:
Date of submission:
QUESTIONS:-
Number Problems/Menu Driven programs based on usage of loops/switch
ASSIGNMENT -1
Using the switch statement, write a menu driven program for the following:
1
23
456
7 8 9 10
11 12 13 14 15
#@#@#
#@#@
#@#
#@
Write a program in Java to accept a number and check whether it belongs to the Fibonacci
Series (sequence) or not.
Fibonacci Series:
The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …
The first two numbers in the series is ‘0’ and ‘1’ and every next number is found by adding up the
two numbers before it.
The 2 is found by adding the two numbers before it (1+1)
Similarly, the 3 is found by adding the two numbers before it (1+2),
And the 5 is (2+3),
and so on!
Example: the next number in the sequence above would be 21+34 = 55
Here is a longer list
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711,
28657, 46368, 75025, 121393, 196418, 317811, …
ASSIGNMENT -3
Instance Variable:
Member methods:
data members to “”
void accept() - To input and store the year, title and rating
void display() - To display the title of a movie and a message based on the rating as
Write a main() to create an object of the class and call the above member methods.
ASSIGNMENT 4:
Write a program to input 15 integer elements in an array and sort them in ascending order using
the bubble sort technique.
ASSIGNMENT 5: Write a menu driven program in Java to provide the following options to generate
and print output
based on user’s choice:
(b) To print the REPUNIT series: 1, 11, 111, 1111, …. upto 'n' terms
(c) To print the sum of factorial of first n terms, where n is input by the user. For example if
n=5 then sum=1+2+6+24+120=153 which is the sum of 1!+2!+3!+4!+5!
A number is said to be NEON, if sum of all the digits of the square of the number
Write a main method to display the menu and to create an object of the class to call the two
methods that display output as per the choices displayed in the menu.
ASSIGNMENT 6:
A Credit card company allows a limit to spend Rs. 15000 to its clients. It also offers cash back facility
according the table shown below. Input the amount spent by the user and display the cash back
amount that he is entitled to.
Amount (in Rs.) Cash Back (in Rs.) First
1000 100
Write a program to declare the class 'Credit' that takes in the name of the client and the
amount spend by him. Calculate the cash back amount and print it along with all the other
input details.
(Assume there are 20 clients. Take details and print the requisite output for each of them
one by one.)
ASSIGNMENT 7:
An electronic shop has announced the following seasonal discount on purchase of certain items.
Write a program based on the above criteria to input name, address, amount of purchase, and type
of purchase (L or 1 for Laptop and D or 2 for Desktop) by a customer. Compute and print the net
amount to be paid the customer along with name and address.
654321 654321 6
54321 65432 65
21 65 65432
1 6 654321
ASSIGNMENT 9:
Prime factors of a number are those factors, which are prime in nature and by which the number
is completely divisible (1 will not be taken as prime number).
Few such numbers are: Prime Factors of 24 are 2, 2, 2, 3 Prime Factors of 6 are 2, 3
ASSIGNMENT 10:
Write a menu driven program to generate the sum of the following series as per the choice
entered by the user.