Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

Computer Applications

The document is an examination paper for Std. X Computer Applications at Campion School, Mumbai, scheduled for October 13, 2023. It consists of two sections: Section A, which includes multiple-choice questions and short answer questions, and Section B, which requires programming tasks. Students are instructed to attempt all questions from Section A and any four questions from Section B, with a total of 100 marks available.

Uploaded by

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

Computer Applications

The document is an examination paper for Std. X Computer Applications at Campion School, Mumbai, scheduled for October 13, 2023. It consists of two sections: Section A, which includes multiple-choice questions and short answer questions, and Section B, which requires programming tasks. Students are instructed to attempt all questions from Section A and any four questions from Section B, with a total of 100 marks available.

Uploaded by

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

CAMPION SCHOOL, MUMBAI

1 TERM EXAMINATION 2023 - 2024


ST

Std. X Date : 13/10/2023 Sub : Computer Applications Time : 2 hours Marks : 100
Answer to this paper must be written on the paper provided separately.
You will NOT be allowed to write during the first 10 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 answer.
Attempt all questions from Section A and any four questions from Section B.
The intended marks for questions or parts of questions, are given in brackets [ ]

SECTION A
(Attempt all questions from this Section.)
Question 1
Choose the correct answers to the questions from the given options.
(Do not copy the question, write the correct answers only.) [1x20=20]
1) Identify the OOP principle depicted in the below image

a. Inheritance b. Polymorphism c. Abstraction d. encapsulation


2) The below image talks about how to create

a. Methods b. variables c. Objects d. Inheritance

3) state the value of y after the following is executed


char x=’9’; y= Character.isLetter(x);
a) False b. 9 c. True d. ‘9’
Contd…2
:2:

4) Which function returns a double object holding the value given by the specified string
a) ToString(double) b) valueOf(String)
c) parseDouble(String) d) None of the above

5) Write a valid statement to declare a single dimension array of 5 integers


a) int ar[5]= new int [5]; b) int ar[]= new int [5];
c) int ar[5]= new ar[5]; d) None of these

6) A constructor
a) is always public
b) never has the same name as class name
c) never returns a value
d) both a & c

7) Automatic conversion of summative data into object of wrapper class


a) Autoboxing b) explicit conversion c) Boxing d) none of these

8) From the given array y[][]={{3,4,5},{6,7,8},{1,2,3}};


The element at y[2][2] is
a) 8 b) 2 c) 4 d) 3

9) Within a string x, and suffix , what is the way to call the endsWith() method?
a) endsWith(x, suffix) b) endsWith(suffix , x)
c) X. endsWith(suffix) d) None of these

10) In Java, how do you check if two strings have the same content?
a) Using == operator b) Using equals() method
c) Using compareTo() method d) Using equalsIgnoreCase() method

11) Choose the odd one out


a) Char b) Float c) Boolean d) String

12) What is the result of Math.floor(16.7) in Java?


a) 16.0 b) 17 c) 17.0 d) 16

13) Is there an error in the below line of code:


String name[] ={”floppy” “doodle” dasher”};
a) Yes b) No c) Cannot say d) It depends on the compiler

14) What is the ASCII value of the character ‘j’


a) 105 b) 73 c) 106 d) 74
15) When we create a 2D array m[3][4] it refers to
a) 3 column and 4 rows b) 3rd column and 3rd row
c) 3 rows and 4 column d) 3rd row and 4th column
contd..3

:3:

16) Out of the following option given which is the reference data type
a) Object b) Character c) String d) Float

17) Find the output of the following


x+=x++ + ++x + --x +x; [ x=5]
a) 29 b) 28 c) 26 d) 25

18) Predict the output of Math.pow(3,2)+ Math.ceil(4.2);


a) 15.0 b) 14.0 c) 13.0 d) 12.0

19) Find the odd one out


a) > b) = = c) & & d) <

20) A single term used to express method overloading


a) Inheritance b) Polymorphism
c) constructor overloading d) Function overloading

Question 2 [2x10=20]
1) Give the output of the following code:
a) “Examination”. compareToIgnoreCase(“EXAMINATION”);
b) “Kaizad”.lastIndexOf(‘a’);
2) Write the output of the following code
String s= “Arnav Ashar”;
for(int i=0;s.charAt(i) !=’ ‘; i++)
System.out.println(s.charAt(i));
3) State two characteristics of a constructor
4) What is the output of the following Math functions:
a) Math.round(2.7);
b) Math. ceil(-3.4);
5) State the difference between entry control and exit control loops
6) If int n[] ={1,4,6,8.4,3,4,2,9.2}, what are the values of x and y?
a) x= Math.pow(n[2], n[6]);
b) y= Math.ceil(n[3] +n[7]);
7) Name any 2 wrapper classes.
8) Write a non-return type method prototype with the name Nikhilesh which accepts a boolean
and a character value.
9) Convert the following for loop into a while loop
for(int i=0, j=4;i<5;i++)
{ j+=i;
System.out.println(j);
}
10) Write a string function in Java checking two strings lexicographically and ignoring the case .
Contd..4
:4:
SECTION B
(Answer any four questions from this Section.)
The answers in this section should consist of the programs in either BlueJ environment or
any program environment with java as the base.
Each program should be written using variable description / mnemonic codes so that the logic of
the program is clearly depicted.
Flowcharts and algorithms are not required.
Question 3: [15]
Define a class to accept 10 names of students in an array . Sort them alphabetically in
an ascending order using selection sort technique. Display the sorted array.

Question 4: [15]
Define a class to overload the method “pattern” as follows:
void pattern(): To print the following format using nested loop
5
54
543
5432
54321
void pattern(int n): To accept a 3 digit number and print the square of first digit
, to print the cube root of second digit and print the ASCII value of third digit
after add 64 to it
Example: n = 462
output – 4 =16
3√6 =1.817
2 +64 =66 = B

Question 5: [15]
Create 2 String 1D Arrays and combine the two array in the following format given in the
example below:
Example:Input
String Arr[]= {“ Two”, “seven”, “twenty”, “nine”};
int num[]={ 4,8,1,5};
Output: Two 4 , Seven 8, twenty 1, nine 5

Question 6: [15]
Create a Java program to check if the given number is a fascinating number or not.
Fascinating Number Example
Let's take any number (n) say 327 and check whether the given number is fascinating or not.
On multiplying the given number (n) by 2 and 3, we get:
327×2=654
327×3=981
Now, concatenate the above results to the given number (n).
"327"+"654"+ "981"= 327654981
We observe that the resultant () contains all the digits from 1 to 9, exactly once.
Hence, the given number 327 is a fascinating number.
Contd..5

:5:

Question 7: [15]
Define a class called with the following specifications:
Class name: NamanK
Member variables:
String name: name of the item purchased
double price: Price of the item purchased
Member methods:
void accept(): Accept the name and the price of the item using the methods of Scanner
class.
void calculate(): To calculate the net amount to be paid by a customer, based on the
following criteria:
Price Discount

5000 – 15000 10.0%

15001 – 30000 15.0 %

30001 – 50000 25.0%

More than 50000 35.0 %

void display(): To display the name of the item and the net amount to be paid.
Write the main method to create an object and call the above methods.

Question 8: [15]
Define a class to accept values into a 4x3 2D array and check if it is a special array.
An array is a special array if the sum of the even elements = sum of the odd elements.
Example:
A[][]={{ 4 ,5, 6}, { 5 ,3, 2}, { 4, 2, 5}, {6,2,9}};
Sum of even elements = 4+6+2+4+2+6+2 =26
Sum of odd elements= 5+5+3+5+9= 27
Not a Special array

*************

You might also like