You are on page 1of 6

Grade X Computer Applications

PROJECT QUESTIONS

Dear students, Hope all are going good. I am sending the Computer Applications
PROJECT questions for this academic year. Try all the questions in BlueJ. Question
numbers you please put as it is given in the questions. Date of Submission is
November 30.

You can do project in a separate note book or a stick file. Write your Name and
Division

Question 1

Write a program to input basic salary and calculate the DA and the gross salary and print
them. The DA is calculated as per the rules given below:
if basic< 2000 then DA is 5% of basic
if basic> = 2000 & <7000 then DA is 8% of basic
if basic> = 7000& <10000 then DA is 10% of basic
if basic> = 10000 then DA is 12% of basic
Gross Salary = Basic + DA.

Question 2

Design a class to overload a function printNumbers() as follows:

a) Print all two digit composite numbers. (Composite numbers are non-prime
numbers, like 10, 12, 14.. 99)
b) Print first N terms of Fibonacci numbers 0 1 1 2 3 5 8----N

Question 3
Design a class to overload a function series() as follows:
a) void series(int x, int n): to display the sum of the series given below:
x1 + x2 + x3 + … + xn terms
b) void series(int p): to display the following series:
0, 7, 26, 63, … p terms.
c) void series(): to display the sum of the series given below:
1/2 + 1/3 + 1/4 + … + 1/10
Question 4
Calculate the sum of the series given below:
1 2 4 8
Sum = + + + + …………… n terms
2! 5! 10! 17!
Question 5
Write a menu driven program to find the sum of the following series depending on the
user choosing 1 or 2. (use switch-case)
a) S=1/4+1/8+1/12.........upto n terms
b) S=1/1!-2/2!+3/3!.......upto n terms
where ! stands for factorial of the number and the factorial value of a number is the
product of all integers from 1 to that number, e.g. 5! = 1 * 2 * 3 * 4 * 5
Question 6
Accept two positive integers m and n, where m is less than n as user input. Display all
Prime-Adam integers that are in the range between m and n (both inclusive) and output
them along with the frequency, in the format given below:
Example 1:
INPUT:
m=5
n = 100
OUTPUT:
The Prime-Adam integers are:
11, 13, 31
Frequency of Prime-Adam integers is: 3

Hint: A Prime-Adam integer is a positive integer (without leading zeroes) which is a prime
as well as an Adam number.

Prime number: A number which has only two factors, i.e. 1 and the number itself.
Example: 2, 3, 5, 7, etc.

Adam number: The square of a number and the square of its reverse are reverse to each
other. Example: If n = 13 and reverse of ‘n’ is 31, then, 132 = 169, and 312 = 961 which is
reverse of 169. Thus, 13 is an Adam number.

Question 7
Write a program input a 4 digit number. Find the sum of the odd digits of the number and
the product of the odd digits of the number. If they are equal then print the square of the
number, otherwise print half the number.
Question 8

The resort “Prime Luxury” wants you to design a billing report for the month of November
2011. The charges are levied on the number of days of stay by the customer.

Number of Days of Stay Rate per day

First 3 days Rs. 3000/-

For next 4 days Rs. 2500/-

More than a week Rs 1999/-

Input the customer name, contact number, number of occupants, number of days of stay
and the allocated room’s number for n customers. Print the bill in the format given below.

Prime Luxury

Billing Report for the month of November 2011.

Customer Name contact number Number of occupants Days of Stay Bill Amount

---- ---- ---- --- ----


---- ---- ---- --- ----
---- ---- ---- --- ----
Total Collection: XXXXX

Question 9

Write a program to input 10 integers in an array. Display the odd subscripted elements and
even subscripted elements separately.
Question 10
Write a program to input an integer array of size 10.Insert a new element in any position
and remove all the duplicate elements

Question 11
Write a program to input 10 numbers in an array. Display all alternate values in reverse,
starting from the last value. If the array holds 1 7 5 9 3, then the output should be 3 5 and
1.

Question 12

Write a program to input 10 values in an array. Display only the even numbers in it. Also
display the average of these numbers (even numbers). Keep in mind that the sum of even
numbers should be divided by the number of even numbers and not the length of the array.
Question 13

Write a program to input a string and convert it in to Uppercase and count and display the
total number of words starting with letter ’A’.

Example: ADVANCEMENT AND APPLICATION OF INFORMTION TECHNOLOGY ARE EVER


CHANGING

Total number of letters starting with letter ‘A’ is: 4

Question 14

Write a program to accept a sentence and display only ‘Palindrome’ words. A word is said to
be palindrome, if it appears to be same after reversing its characters

Sample Input: MOM AND DAD ARE NOT AT HOME

Sample Output: MOM


DAD

Question 15

Write a program to accept a sentence then convert it to Title Case. That means first
character of each word should be capital and remaining are small letter. (e.g. INDIA IS MY
COUNTRY become India Is My Country)

Question 16

Design a class named Check to overload a function Check() as follows:

1. void Check(String s1, String s2) with two string arguments and print the string
which is greater in length.
2. void Check with one string argument and print the first and the last character of
the string.
3. int Check(String s, char ch) with one string argument and one character argument
and return the frequency of the character argument in the given string

Write main method to call above member methods to display the output.

Question 17

Write a program in Java to enter a sentence. Frame a word by joining all the first
characters of each word of the sentence. Display the word.
Sample Input: Vital Information Resource Under Seize
Sample Output: VIRUS
Question 18

A Cyber Café charges for the usage of computer according to the number of minutes
it has been used. Design a class for the Café to calculate the bill for each customer.
The attributes and the behavior of the class is given below.
Class name: CyberBill
Data members:
String custName: customer name
long contact: contact number of the customer
int time: minutes the computer was used
double bill: charge for using the computer
Member methods:
CyberBill( ): default constructor
void input(): accept the customer name, contact number and the usage of
the computer in minutes.
void calcBill(): calculate the bill amount as given below
For the first 60 minutes - 20/-
For the next 30 minutes - 12/-
For the next 15 minutes - 8/ -
otherwise - 2/ - Per Minute
void printBill(): print a bill with all the details for the customer
Question 19
Define a class Student as given below:
Data members/instance variables:
name: to store the student’s name.
age: to store the age.
m1, m2, m3: to store the marks in three subjects.
maximum: to store the highest marks among three subjects.
average: to store the average marks.
Member functions:
(i) A parameterized constructor to initialize the data members.
(ii) To accept the details of a student.
(iii) To compute the average and the maximum out of three marks.
(iv) To display all the details of the student.
Write a main() method to create an object of the class and call the above methods
accordingly to enable the task.
Question 20

Write a program in Java to initialize an array of 10 distinct names and initialize another
array with their respective telephone numbers. Search for a name by the user in the list. If
found , display “Search Successful” along with their phone number else print “Search
Unsuccessful, Name not enlisted”

You might also like