0% found this document useful (0 votes)
12 views

Final Assignment-Class X

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Final Assignment-Class X

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

St.

Stephen’s School
Annual Assignment-2024-25
Class –X
Subject: Computer Applications

1. Employees at Arkenstone Consulting earn the basic hourly wage of Rs.500. In addition to
this, they also receive a commission on the sales they generate while tending the counter.
The commission given to them is calculated according to the following table:

Total Sales Commmision Rate

Rs. 100 to less than Rs. 1000 1%

Rs. 1000 to less than Rs. 10000 2%

Rs. 10000 to less than Rs. 25000 3%

Rs. 25000 and above 3.5%

Write a program in Java using method


void input() that inputs the number of hours worked and the total sales and name of the
employee and employee id,
void calc() to calculate the hourly wages and
void display() to show employee id, name ,hours worked and hourly wage .

Create a main method to create object of the class and call the methods .

2. Write a program to input and store integer elements in a double dimensional array of size 4
x 4 and find the sum of all the elements.
7 3 4 5
5 4 6 1
6 9 4 2
3 2 7 5
Sum of all the elements = 73
3. Write a program to accept a string and count the number of vowels present in the string.

Sample: The Quick brown fox jumps over a lazy dog


No. of vowels: 10
4. Write a program to accept the year of graduation from school as an integer value from the user.
Using the binary search technique on the sorted array of integers given below, output the
message "Record exists" if the value input is located in the array. If not, output the message
"Record does not exist".
Sample Input:

n[0] n[1] n[2] n[3] n[4] n[5] n[6] n[7] n[8] n[9]
1982 1987 1993 1996 1999 2003 2005 2007 2009 2011

Input a year: 1987


“Record Exists”

5. Design a class to overload a function check() as follows:


void check(String str,char ch): to find and print the frequency of character in a string
input : str=”success”
ch=‘s’
output: Number of ‘s’ in the given string : 3
void check(String s1)- to display only the vowels in s1 after converting it to lowercase
input: s1=”EDUCATION”
vowel=e u a i o

6. Write a menu driven program with following choices:

Choice 1:
9
9 7
9 7 5
9 7 5 3
9 7 5 3 1

Choice 2:
Print the following series:
2 10 30 68 130 …. Upto terms

7. Write a program to perform following operations in a 2D array:


i) Replace the even elements with its square
ii) Replace the odd elements with its cube

Sample: Input

7 3 4 5
5 4 6 1
6 9 4 2
3 2 7 5

343 27 16 125
Output:
125 16 36 1
36 729 16 8
27 8 343 125

8. Write a program to input a sentence as string and replace all the consonants with previous letter
and vowels as it is.
Sample: I love computer
Output: j koue bolouseq

9. Write a program to accept values in two 2-D arrays of 3*3 matrix and find the sum of their values
into a third 2-D array of 3*3 matrix

Sample inputs:
1 2 3
4 5 6
7 8 9

1 4 7

3 5 7

2 8 9

Sample output:
2 6 10

7 10 13

9 16 18

10. Write a menu driven program to perform operations on string based on user’s choice
a) Replace a character with a special symbol
Sample: Input: Emergency
Output: *m*rg*ncy
b) Accept a string and form a pattern
Sample input: INDIA
I
I N
I N D
I N D I
I N D I A

INSTRUCTIONS
1. Program Questions must be printed pasted on left side(white page)
2. Print the codes with comment lines in BlueJ Environment only and pasted on right
side Do Not take any snapshot or screenshot of the code (ruled page)
3. At the Beginning of every program there should be your name,class,section,Roll
number , UID as Comment lines.
4. Print the Outputs in BlueJ Environment only and must be printed , Do not take any
snapshot or screenshot of the code pasted on left side.(white page/back of code page)
5. Variables list must be hand written on right side ruled page and the headings are as
follows
VariableName Type Purpose
6. Finally write down the conclusion about your assignment and specify the software
name with version and the total time taken to complete the task.
7. Use only A4 interleaf pages to complete the assignment
8. Use blue and black ball pen only
9. Prepare an INDEX of this assignment only printout is acceptable and to be pasted on
first page.
10. Use A4 Size Hard cover practical copy to complete the assignment
11. Cover the hard board by brown paper
12. In the cover page write your name ,class, section, UID

You might also like