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

Computer Assesment I QP

This document contains an assessment for Class X on the subject of Computer Application. It consists of 3 sections - Section A contains 8 multiple choice questions worth 2 marks each, Section B contains 6 programming questions worth 15 marks each. The assessment is for a total of 100 marks and students are given 2 hours to complete it. They will get an additional 15 minutes to scan and upload their answers in PDF format with their name and section.

Uploaded by

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

Computer Assesment I QP

This document contains an assessment for Class X on the subject of Computer Application. It consists of 3 sections - Section A contains 8 multiple choice questions worth 2 marks each, Section B contains 6 programming questions worth 15 marks each. The assessment is for a total of 100 marks and students are given 2 hours to complete it. They will get an additional 15 minutes to scan and upload their answers in PDF format with their name and section.

Uploaded by

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

Ashoka Universal School

Academic Session 2020-2021


Assessment I
Class: X
Time: 2hrs Computer Application Marks: 100mks
________________________________________________________________________________________________________
Answer to this Paper must be written in a long register with a dark pen.
You will not be allowed to write during the first 15 minutes.
This time is to be spent in reading the Question Paper
The time given at the head of this paper is the time allowed for writing the answers.
You will get additional 15 minutes to scan and upload the answers in Google Classroom.
The scanned file should be uploaded in PDF format with the Name and Section of the student.
Variable Table is compulsory.

Section A
Question 1:
1. Name the following: [2]
a. an operator which implements polymorphism.
b. keyword used for instantiation.
2. Why a class is called an object factory? [2]
3. Write one difference between / and % operator. [2]
4. Name and give example for each: [2]
a. entry-controlled loop
b. exit controlled loop.
5. State the difference between Constructor and Method. [2]
Question 2:
1. What is Function Signature? Give Example. [2]
2. Write a return type for the following methods- a. charAt ( ) b. lastIndexOf ( ) [2]
3. State the methods of String Initialization with example. [2]
4. Write a java expression for the following. [2]
√(𝑎−𝑏)𝑥+𝑐
𝑠= 𝜋+𝑏
5. Rewrite using conditional operator: [2]
if(x= =50)
amount=500;
else
amount=10.0/100*x;
Question 3:
1. Give the output of the following string functions: [2]
a. “ACHIEVEMENT”.replace(‘E’,‘A’)
b. “DEDICATE”.compareTo(“DEVOTE”)

2020-2021/Grade-X/Assessment I/Computer Application Page 1 of 5


2. State the output of the following program segment: [2]
String str1 = “great”; String str2 = “minds”;
System.out.println(strl.substring(0,2).concat(str2.substring(1)));
System.out.println((“WH” + (strl.substring(2).toUpperCase())));

3. Solve the following expressions and give the of a, b and c. Consider a=3, b=4, c=6; [2]
a+= ++a*b++ /c++ + b++;
4. Give the output of the following program segment and also mention the number of times
the loop is executed: [2]

5. Give the output of the following: [2]


a. Math.floor (-4.7)
b. Math.ceil(3.4) + Math.pow(2, 3)
6. What will be the output and how many times the loop will be repeated for the following
code? [2]
int m=2; int n=15;
int i = 1;
while( i++<5)
m++;
– –n;
System.out.println(“m=” +m);
System.out.println(“n=” +n);
System.out.println(“i=” +i);

7. State the output of the following program segment. [2]

String s = “Examination”;
int n = s.length();
System.out.println(s.substring(5, n)).toUpperCase());
System.out.println(s.charAt(2) == s.charAt(6));
8. Write function prototypes for the following: [1]

a. Private access method sum which accepts three int type variables as parameters and
return a float type.

2020-2021/Grade-X/Assessment I/Computer Application Page 2 of 5


9. For the given snippet answer the question that follow:

public class Blank1

{
int num1,num2;
Test()
{
System.out.print("1");
new Test(10);
System.out.print("5");
}
Test(int temp)
{
System.out.print("2");
new Test(10, 20);
System.out.printf("4");
}
Test(int data, int temp)
{ num1=data;
num2=temp;
System.out.print("3");

}
void sum() // method 1
{
System.out.println(“Ans:”+(num1+num2));
}

public static void main()


{
Test obj = new Test();
obj.sum();
} }

For the above snippet answer the question:


a) What type of function is method1. [1]
b) Fill in the Blank1. [1]
c) What concept of OOPS in implemented in above snippet. [1]
d) Give the output of the above code. [2]

2020-2021/Grade-X/Assessment I/Computer Application Page 3 of 5


Section B
(Any 4)
Question 1: [15]

A courier company charges differently for 'Ordinary' booking and 'Express' booking based on the weight
of the parcel as per the tariff given below:

Weight of parcel Ordinary booking Express booking

Up to 100 gm ₹80 ₹100

101 to 500 gm ₹150 ₹200

501 gm to 1000 gm ₹210 ₹250

More than 1000 gm ₹250 ₹300

Write a program to input weight of a parcel and type of booking (`O' for ordinary and 'E' for express).
Calculate and print the charges accordingly.
Question 2: [15]
Write a menu driven programs to do the following:

i. 1
12
123
1234
12345
ii. to accept a number from the user and check whether it is a Palindrome or not.
Also display the sum of digits and its average.
Question 3: [15]
Define a class called Mobike with the following description: Instance variables/ Data
members:
bno : to store the bike’s number
phno : to store the phone number of the customer
name : to store the name of the customer
days : to store the number of days the bike is taken on rent
charge : to calculate and store the rental charge
Member methods:
Mobike() : default constructor to initialize the data members with default values.
void input () : to input and store the detail of the customer.

2020-2021/Grade-X/Assessment I/Computer Application Page 4 of 5


void compute () : to compute the rental charge. The rent for a Mobike is charged on the
following basis

First five days : 500 per day

Next five days : 400 per day

Rest of the days : 200 per day

void display () : to display the details in the following format:

Bike No. Phone No. Name No. of days Charge

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

Question 4: [15]
Design a class to overload a function series( ) as follows:

1. double series(double n) with one double argument and returns the sum of the series.
sum = (1/1) - (1/2) + (1/3) - .......... + (1/n)
2. double series(double a, double n) with two double arguments and returns the sum of the
series.
sum = (1/a2) + (4/a5) + (7/a8) + (10/a11) + .......... to n terms

Question 5: [15]
Special words are those words which start and end with the same letter.
Example: EXISTENCE, COMIC, WINDOW
Palindrome words are those words which read the same from left to right and vice-versa.
Example: MALYALAM, MADAM, LEVEL, ROTATOR, CIVIC
All palindromes are special words but all special words are not palindromes.

Write a program to accept a word. Check and display whether the word is a palindrome or only a
special word or none of them.

Question 6: [15]
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.
Input: C:\Users\admin\Pictures\flower.jpg
Output Path: C:\Users\admin\Pictures\
File name: flower
Extension: jpg

2020-2021/Grade-X/Assessment I/Computer Application Page 5 of 5

You might also like