0% found this document useful (0 votes)
37 views12 pages

Final G10 ICSE Assignments 2022 23

Uploaded by

Samarth Gandhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views12 pages

Final G10 ICSE Assignments 2022 23

Uploaded by

Samarth Gandhat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 12

AVALON HEIGHTS INTERNATIONAL SCHOOL

ICSE Practical Assignments for X 2022-23

NAME: CLASS: ROLL NO: DATE:

Topic S. Program Pg Sig


no n
Computa 1 Write a program to input the basic salary of an employee and 1
tions calculate his gross and net salary based on the information given
below:
using
D.A. (Dearness Allowance)=75% of Basic Salary
operators H.R.A. (House Rent Allowance)=25% of Basic Salary
and Math P.F. (Provident Fund) = 12% of (Basic + D.A.)
Gross Salary=Basic + D.A + H.R.A
functions
Net Salary=Gross Salary – P.F

2 Write a program to input the values and calculate the value of the 2
integer X based on the following expression:
X= a+ba+³√c+5

3 Write a program to input three unequal numbers. Display the 3


second smallest number.

Write a program to input the values of two integer variables and


4 swap the values of these variable without using third variable and 4
any arithmetic operator.

Decision 5 Write a program to computerize the billing operation of a Taxi 5-6


Making company based on the following slab,
Category Base Fare Distance Waiting
Fare Time Fare
Micro Rs.40 Rs.6 per km Re 1 per
min
Mini Rs.40 Rs.10 per km Re.1 per
min
Sedan Rs.40 Rs.12 per km Re.1 per
min
Write a program to input two unequal positive numbers and
6 check whether they are perfect square or not. If the user enters a 6-8
negative then the program displays the message “Square root of
a negative number can’t be determined”.
Example 1:
Input : 81, 100
Output: They are perfect square numbers.
Example 2:
Input : 225,86
Output: 225 is a perfect square number.
86 is not a perfect square number.

A hotel is giving seasonal discount on the total amount to be paid


7 by the person staying at the time of check out. The charges for 8-9
one day stay is 850.0 per room. The discount will be given as per
the following criteria:
Number of days stayed Discount on total amount
Up to 5 days 10%
> 5 days and <= 10 days 15%
> 10 days and <= 20 days 20%
More than 20 days 25%

Write a program to input name of guest, total number of days


stayed in the hotel. Calculate the total amount to be paid and
discount amount. Find the net balance to be
paidexcluding the discount. Print the bill including all the data.
Loops 8 WAP to find whether the number entered is a perfect number. 10
A perfect number is equal to the sum of its factors other than the
number itself.
Example:
Input: 6
Output: 6 is a perfect number
(working 6=1+2+3)

9 Write a program to input a number and check it is a Disarium 11


Number or not.
Note: A number will be called DISARIUM if sum of its digits
powered with their respective position is equal to the original
number.
Example:
Input: 135
Output: 135 is a Disarium number.
(Working: 11+32+53=135.)

10. Write a program to enter a number and check whether the


number entered is a neon number or not. 12-
( A neon number is a number where the sum of the digits of the 13
square of the number is equal to the number itself.
For example 9 is a neon number. It's square is 9 x 9 = 81 and the
sum of the digits (8 + 1) is 9
1 is also a neon number.
Note: Except 1 and 9 there are no more neon numbers between
1 to n.)
Series 11 WAP to compute the sum of the series: 13
(i) S = 1/4 + 1/8 + 1/12 + ……n terms 14
(ii) S = x/1 – x2/3 + x3/5 – x4/7… n terms

12 Write a program to print the following:


(i) 1, 4, 9, 16, 25, ……n terms
(ii) 3,5,7,11,….. n terms

13 Write a program to print the Fibonacci series.


0,1,1,2,3,5,8,13…….

Nested 14 Write a menu driven program to print the following: 14


Loops (i) 1 (ii) 1 2 3 4 15
12 5 6 7
123 8 9
1 234 10
(iii) 0
1 0
010
1010
01010
101010

15 Write a menu driven program to print the following:


(i) To accept any 20 numbers and display only those 16
numbers which are prime.
(ii) To accept a number and check whether that number is
automorphic number or not.
(Note: An automorphic number is a number which is present in
the last digit(s) of its square.)
Example:
Input: 25
Output: its square is 625 and it is an automorphic number.
(working: its square is 625 and 25 is present as the last digits)

Function 16 Write a java method ‘result’ that takes the marks in three 17
s and subjects: eng, maths and comp as parameters from the main.
Construc The method returns the percentage of the student assuming that
tors maximum marks of each subject is 100.
Define the main method for calling the ‘result’ method.

17 Write a class with name volume using function overloading that 18


computes the volume of a cube, a sphere and a cuboid.
Formula :
volume of a cube(vc) = s*s*s
volume of a sphere(vs)=4/3*π*r*r*r (where π=3.14 or
22/7)
volume of a cuboid(vcd)=l*b*h
(Any one of the above function should return a value to the
calling program.)

18 Design a class to overload a function num_calc( ) as follows:


a) void num_calc (int num, char ch) with one integer argument 19
and one character argument, computes the square of
integer argument if choice ch is ’s’ otherwise finds its
cube.
b) void num_calc(int a, int b, char ch) with two integer arguments
and one character argument. It computes the product of
integer arguments if ch is ‘p’ else adds the integers.
c) void num_calc(String s1, String s2) with two string arguments,
which prints whether then strings are equal or not.

19 Design a class name ShowRoom with the following description:


Instance variables/ Data members : 20
String name – To store the name of the customer
int mobno – To store the mobile number of the customer
double cost – To store the cost of the items purchased
double dis – To store the discount amount
double amount – To store the amount to be paid after discount
Member methods: –
ShowRoom() – default constructor to initialize data members
void input() – To input customer name, mobile number, cost
void calculate() – To calculate discount on the cost of purchased
items, based on following criteria

Cost Discount (in


percentage)
Less than or equal to ₹ 1000 5%
More than ₹ 1000 and less than or equal 10 %
to ₹ 2000
More than ₹ 2000 and less than or equal 15 %
to ₹ 3500
More than ₹ 3500 20 %

void display() – To display customer name, mobile number,


amount to be paid after discount
Write a main method to create an object of the class and call the
above member methods.

20
Define a class named Fruit Juice with the following description:
Instance variables / data members :
int product_code — stores the product code number
String flavour — stores the flavour of the juice (E.g. orange,
apple, etc.)
String pack_type — stores the type of packaging (E.g. tetra-
pack, PET bottle, etc.)
int pack_size — stores package size (E.g. 200 ml, 400 ml, etc.)
int product_price — stores the price of the product
Member methods :
(i) FruitJuice() — Default constructor to initialize integer data
members to 0 and String data members to.
(ii) void input( ) — To input and store the product code, flavour,
pack type, pack size and product price.
(iii) void discount( ) — To reduce the product price by 10.
(iv) void display() — To display the product code, flavour, pack
type, pack size and product price.
Strings
21
Write a main method to create an object of the class and call the
above member methods.
22

Write a program to accept a word and convert all lowercase to


uppercase and vice versa.
23 Write a program to accept a word and print the number of times
the letter ‘a’ has appeared in the word.
24 Write a program to accept a sentence and print the number of
words in it
Write a program to accept a word and print the number of vowels
25 in it
Write a program to accept a word and display the characters in
reverse order
26
Write a program to print the following pattern:
27 J
A
V
A

Write a program to print the following pattern:


J
28 Ja
Jav
Java

Write a program to accept a string and replace all vowels with *

29 Write a program to input a word. Replace each consonant in the


word with the previous letter. However, if the previous letter is a
vowel, replace it with the next letter. Other characters should
30 remain the same. Finally display the new word.
Sample input : CAT
Sample output : BAS
Sample input: BOOM
Sample output: COOL

Write a program to check whether a string entered is palindrome


or not.

31 Write a program to find the shortest and the longest word in a


sentence and print them along with their length.
Example:
32 Input: I am learning Java
Output:
Shortest word = I
Length = 1
Longest word = learning
Length = 8

Write a program to input a string (word). Convert it into lowercase


letters. Count and print the frequency of each alphabet present in
the string. The output should be given as:
33 Input: Alphabets
Output:
Alphabet Frequency
a 2
b 1
e 1
h 1
l 1
p 1
s 1
t 1

Write a program that encodes a word into Piglatin. To translate a


word into a Piglatin word, convert the word into uppercase and
then place the first vowel of the original word as the start of the
new word along with the remaining alphabets. The alphabets
34 present before the vowel being shifted towards the end followed
by “AY”.
Example 1:
Input : London
Output: ONDONLAY
Example 2:
Input : Olympics
Output : OLYMPICSAY

Write a program to assign a full path and file name as given


below. Using library functions, extract and output the file path, file
name and file extension separately as shown.
35 Example:
Input: C:Users\admin\Pictures\flowers.jpg
Output:
Path: C:Users\admin\Pictures
File name: flower
Extension: jpg

Write a program to input a word from the user and remove the
consecutive repeated characters by replacing the sequence of
repeated characters by its single occurrence.
36 Example 1:
INPUT – Jaaavvvvvvvvaaaaaaaaaaa
OUTPUT – Java
Example 2:
INPUT – Heeeiiiissggoiinggg
OUTPUT – Heisgoing
Arrays 37 Write a program to declare an integer array of size 5. Initialize all
its elements to zero. Accept the values of the array elements
from the user and then display it.

38 Write a program to store 10 numbers in an array and print the


greatest and smallest of the numbers entered.

39 Write a program to accept 10 different numbers in single


dimensional array and display the sum of all numbers.
40 Write a program to accept 10 different numbers in single
dimensional array and display the sum of numbers divisible by 3
or 5.

41 Write a program to enter a number and search if the number is


present in the array using Binary Search technique.

42 Write a program to enter numbers in an array. Sort them in


descending order using bubble sort technique.

You might also like