0% found this document useful (1 vote)
2K views6 pages

Grade 10 ICSE Assignments - Internal Assessment

This document provides instructions and questions for a computer applications assignment for Grade 10 students. It includes 20 questions covering topics like palindrome numbers, Fibonacci series, prime numbers, classes, arrays, sorting, and more. Detailed instructions are provided at the start regarding formatting, comments, and output for the programming questions.

Uploaded by

Naman Pahuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
2K views6 pages

Grade 10 ICSE Assignments - Internal Assessment

This document provides instructions and questions for a computer applications assignment for Grade 10 students. It includes 20 questions covering topics like palindrome numbers, Fibonacci series, prime numbers, classes, arrays, sorting, and more. Detailed instructions are provided at the start regarding formatting, comments, and output for the programming questions.

Uploaded by

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

DPS INTERNATIONAL SCHOOL

Computer Applications Assignments


2022-2023
Grade :10 ICSE

_________________________________________________________
Instructions to be followed while writing the programs in Record:
• All the questions are to be followed in sequence.(Below Sequence will be followed
by all students)
• Write complete questions
• After writing the question, students need to write Algorithm, followed by the
program code(with comments) and variable descriptors.
• Output of the program should be printed with BlueJ terminal window(visible)
• Use Scanner class to input the data.
• Do not write sample data while writing questions.
• Do not write any dates.

Question 1
Write a java program to accept a number from the user and check if the number is
palindrome or not.
[A palindrome number is a number which reads the same from either side , backward or
forward Example – 1234321, 1443441 etc]

Question 2
Using the switch statement , write a menu driven program to :

i) Generate and display the first 10 terms of the Fibonacci series 0,1,1,2,3,5,…. The first two
Fibonacci numbers are 0 and 1, and each subsequent number is the sum of the previous
two.
(ii) Find the sum of the digits of an integer that is input.
Sample input :15390
Sample Output :Sum of digits=18
For an incorrect choice, an appropriate error message should be displayed.

Question 3
Write a menu driven program to accept a number and check and display whether it is a
Prime Number or not OR an automorphic number or not. (Use Switch-case Statement).
i) Prime Number : A number is said to be prime if it is divisible only by 1 and itself and not
by any other number. Example :3,5,7,11,13 etc
ii) Automorphic Number : An automorphic number is the number which is contained in the
last digit(s) of its square.
Example: 25 is an automorphic number as its square is 625 and 25 is present as the last two
digits.

Question 4
An electronic shop has announced the following seasonal discounts on the purchase of
Purchase Amount in Rs. Discount on Laptop Discount on Desktop PC
0 – 25000 0.0% 5.0%
25000 – 57000 5.0% 7.6%
57001 – 100000 7.5% 10.0%
More than 100000 10.0% 15.0%

Write a program based on the above criteria to input name, address, amount of purchase
and type of purchase (L for laptop and D for Desktop) by a customer. Compute and print the
net amount to be paid by a customer along with his name and address.
(Hint : discount = (discount rate/100)*amount of purchase
Net amount = amount of purchase – discount)

Question 5
Define a class Electric Bill with the following specifications :
Class : Electric_Bill
Instance Variable/Data Member :
String n – To store the name of the customer int
units – to store the number of units consumed
double bill – to store the amount to be paid
Member methods :
Void accept() – to accept the name of the customer and the number of units consumed Void
calculate() – to calculate the bill as per the following tariff:
Number of Units Rate per Unit
First 100 Rs. 2.00
Next 200 Rs. 3.00
Above 300 Rs. 5.00

A surcharge of 2.5% charged if the number of units consumed is above the member
methods.
Question 6
Design a class to overload a function compare( ) as follows:
void compare(int, int) — to compare two integers values and print the greater of the two
integers.
void compare(char, char) — to compare the numeric value of two characters and print with
the higher numeric value.
void compare(String, String) — to compare the length of the two strings and print the longer
of the two.

Question 7
Write a program using a function called area() to compute area of the following:
(a) Area of circle = (22/7) * r * r
(b) Area of square= side * side
(c) Area of rectangle = length * breadth
Display the menu to display the area as per the user's choice.

Question 8
Write a program in Java to accept a string in lowercase and change the first letter of every
word to uppercase. Display the new string. Sample INPUT : we are in cyber world
Sample Output : We Are In Cyber World

Question 9
Write a program to assign a full path and filename as given below. Using library functions ,
extract and output the file path , file name and file extension separately as shown : Input :
C:\Users\admin\Pictures\flower.jpg Output:
Path : C:\Users\admin\Pictures\
File name : flower
Extension: jpg

Question 10
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 present before the
vowel being shifted towards the end followed by “AY”.
Sample Input (1) : London,
Sample Output (1) : ONDONLAY
Sample Input (2) : Olympics,
Sample Output (2) : OLYMPICSAY
Question 11
Write a program to initialize the seven Wonders of the World along with their locations in two
different arrays. Search for a name of the country input by the user. If found, display the
name of the country along with its Wonder, otherwise display "Sorry not found!".
Seven Wonders:
CHICHEN ITZA, CHRIST THE REDEEMER, TAJ MAHAL, GREAT WALL OF CHINA,
MACHU PICCHU, PETRA, COLOSSEUM
Locations:
MEXICO, BRAZIL, INDIA, CHINA, PERU, JORDAN, ITALY Examples:
Country name: INDIA
Output: TAJ MAHAL
Country name: USA
Output: Sorry Not found!

Question 12
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 2006 2007 2009 2010

Question 13
Write a program to accept 10 integers elements from the user in a single dimensional array
and sort them in ascending order using selection sort technique.
Question 14
Write a program to accept 10 names from the user in a single dimensional array and sort
them in descending order using bubble sort technique.

Question 15
Write a program to accept the numbers in a 4 by 4 matrix in a Double Dimensional Array
from the user. Find the sum of the numbers of the left diagonal and the sum of the right
diagonal of the matrix.
Question 16
Write a program to store 6 elements in an array P and 4 elements in an array Q. Now,
produce a third array R, containing all the elements of array P and Q. Display the resultant
array.
Input Input Output
P[ ] Q[ ] R[ ]
4 19 4
6 23 6
1 7 1
2 8 2
3 3
10 10
19
23
7
8

Question 17
Using the switch statement, write a menu driven program for the following:
(a) To print the Floyd's triangle:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
(b) To display the following pattern:
I
IC
ICS
ICSE
For an incorrect option, an appropriate error message should be displayed.
Question 18
Using switch statement, write a menu driven program for the following:
(a) To find and display the sum of the series given below:
S = x1 - x2 + x3 - x4 + x5 - ………… - x20; where x = 2 (b)
To display the series:
1, 11, 111, 1111, 11111
For an incorrect option, an appropriate error message should be displayed.
Question 19
Define a class named movieMagic with the following description:
Data Members Purpose

int year To store the release of a movie

String title To store the title of the movie

float rating To store the popularity rating of the movie


(minimum rating =0.0 and maximum
rating=5.0)

Member Methods Purpose


movieMagic() Default constructor to initialize numeric data
members to 0 and String data member to””.

void accept() To input and store year, title and rating


void display() To display the title of the movie and a
message based on the rating as per the
table given below

Rating Table

Rating Message to be displayed

0.0 to 2.0 Flop

2.1 to 3.4 Semi-Hit

3.5 to 4.4 Hit

4.5 to 5.0 Super-Hit

Write a main method to create an object of the class and call the above member methods.
Question 20
Define a class Student as given below:
Data members/instance variables:
name, age, m1, m2, m3 (marks in 3 subjects), maximum, average Member
methods:
A parameterized constructor to initialize the data members.
To accept the details of a student.
To compute the average and the maximum out of three marks.
To display the name, age, marks in three subjects, maximum and average.
Write a main method to create an object of a class and call the above member methods.

You might also like