0% found this document useful (0 votes)
828 views5 pages

Computer Applications Exam Paper 2024-25

Uploaded by

Tamilselvi
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 (0 votes)
828 views5 pages

Computer Applications Exam Paper 2024-25

Uploaded by

Tamilselvi
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

BEFORE SOUTH END SCHO0L

SS
WALHATI BIRGHUM
Affiliated to CISCE, New Delhi (|CSE)
School Code: WB420
Nalhati, Birbhum
IX Scan to access our Virtual
Queslion Bank

SECOND TERMINAL EXAMINATION YEAR 2024-25

Maximum Marks - 100 Time - 2 Hours


Subject- Computer Applications (Theory)

This paper is divided into two Sections.


Atlempt all questions from Section Aand any four questions from Section B.
The intended marks for questions or parts of questions are given in brackets [J.

SECTION A
(40 Marks)
(Attempt all questions from this Section.)
Question 1 [20]
Choose the correct answers to the questions from the given options. (Do not copy the question, write
the correct answer only.)
(i) Name the feature of Java depicted in the following picture.

AWriter
APlayer

Student

ABoy

(a) Data abstraction (b) Polymorphism (c) Inheritance (d) Encapsulation


(iü) Unicode character coding scheme uses integer literals.
(a) Decimal (b) Octal (c) Hexadecimal (d) All of these

(iii) The constant that reserves 64 bits of memory space is:


(a) "HUMAN" (b) 23.56 (c) 103 (d) 'G'
(iv) Unique ID of students is an example of.
(a) Data type (b)Characteristic (c) Behaviour (d) Keyword
(v) The keyword 'else' is associated with:
(a) Single if-statement (b) Multiple if-statement (c) for loop (d) None of these
(vi) Which of the following can be a return value of nextFloat() method ?
(a) 6.2 (b) 1.0F (c) 40 (d) Allof these
Page 1of 5
(vii) Which of the following is/are illegal lines of Java code ?
1. string str = "CODING CONCEPT":
2. int byte1 = 795;
(a) Only 1 (b) Only 2 (c) Both 1and 2 (d) None of these

(vii) The method that accepts astring without any space is:
(a) nextSpace() (b) next() (c) nextLine() (d) nextBoolean()
(ix) The number-423 can be stored in avariable of data type:
(a) short (b) int (c) long (d) All of these
(x) Predict the output, if n =500.
int n, a= 500;
if(a + n * 10> 5000)
System.out.println(100);
else

System.out. println(200);
(a) 100 (b) 200 (c) No output will be produced (d) Syntax error
(xi) Which of the following is not a Java reserved word ?
(a) import (b) public (c) class (d) None of these
(xii) The term used to express the ability of objects to interact with each other is:
(a) Instantiation (b) Message Passing (c) Logical construct (d) All of these
(xii) Assertion (A): Math.sqrt() method cannot be used to find the square root of a negative number.
Reason (R): The method returns NaN for a negative number.

(a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of
Assertion (A)
(b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion (A)
(c) Assertion (A) is false and Reason (R) is true
(d) Assertion (A) is true and Reason (R) is false
(xiv) The operation that is at first performed by any loop is:
(a) Initialisation of loop control variable
(b) Checking loop condition
(c) Updation of loop control variable
(d) Callinga function
(xv) The error that is encounteredduring the compile-time of the program is error.

(a) Syntax (b) Logical (c) Runtime (d) Exception


(xv) What will be the final value that will be stored in the variable res ?
double res = Math.abs(Math.floor(-8.50));
(a) -8.0 (b)-9 (c) 9.0 (d) 9
(xvi) The data type that is not supported for a case value in switch-case statement is:
(a) long (b) char (c) boolean (d) double
Page 2 of 5
(xviil) An operator that is used to form a condition is:
(a) += (b) * (c) == (d) =
(XIX) Assertion (A): The for' loop is an
entry-controlled loop.
Reason (R): The value of the loop control variable is always increased in its every iteration.

(a) Dotn Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation or
Assertion (A)
(0) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of
Assertion (A)
(C) Assertion (A) is false and Reason (R) is true
(d) Assertion (A) is true and Reason (R) is false

(xx) Predict the output of the following code segment:


int d = 10;
System.out.println(d % d/ d);
(a)10 (b) 1 (c) 0 (d) 11

Question 2
Answer the following questions (working must be shown if required):
() Define Inheritance. (2]
(ii) What do youunderstand by byte code ? [2]
(ii) What is danglingelse problem in Java ? [2
(iv) WriteaJava expression for thefollowing mathematical expression: [2]
term = Vb2 4ac
(v) Evaluate the following expression when x = 2: [2]
x *=+tx % --X + x;
(vi) Design the header of a for loop where the loop control variable is a loop-scope variable with the initial
value 10 and the loop is required to be executed 20 times (loop body is not required). [2]
(vi) Why is conditional assignment operator also termed as Ternary operator ? [2]
(vii)Write two differences between relational (!=) and logical (!) operators.
(ix)Write a Java statement to generate a random integer from 5to 10 (both inclusive). [2]
(x) Predict the output when ch = 'A' and ch = 'a': (2]
switch(ch)

case 'a': System.out.printin("Dedication");


case b': System.out.println("Discipline");
break;
case 'c': System.out.printn("Hardwork");
default: System.out.println("Achievement"):
Page 3 of 5
SECTION B (60 Marks)
(Answer any four guestions from this Section)
The answers inthis section should consist of theprograms in either BlueJ environment or any
program environment with Java as the base.
bach program should be written using variable description / mnemonic codes so that the logic of the
program is clearly depicted.
For accepting input from the user, a Scanner class object must be used.
Flow-charts and algorithms are not required.

Question 3

Design a class for amenu-driven program using switch-case for the following purposes in accordance with
achoice entered by the user: [15]
() Accept a number and print its total number of factors.
(i) Accept a number and print its sum of all proper factors.
Display a relevant error message if the user opts for an invalid choice.

Question 4
Design aclass to accept 20 integers (positive and negative)without any order and display the highest odd
number containing four digits among those input values. If no 4-digit number is entered, display the error
message "No 4-digit integer is entered." (application of nested loop is not permitted). [15]

Question 5

Design a class to accept an integer number in positive form and verify whether it is a Prime number, or
Composite number or neither Prime nor Composite number. [15]

Question 6
Design a class to print the 10th term of the series as follows: [15]
2, 5, 10, 17,

Question 7
A library charges a fine for books returned late as per the criteria given below: [15]

Number of Days Charge


First 5 days 2 per day

Next 5 days 75 per day


Next 10days 7 per day

Above 20 days Z10 per day


Page 4 of 5
oga class to accept the full name of the borrower and the number of days late to return the book
and
P Uie amount of fine to be paid. Thereafter. display the results in the following format (use the Unicode
\u20B9' for printing the Indian rupee
symbol):
Name of the
borrower
Number of davs late to return the book
Amount of fine to be paid F***

Question 8
Design a class for a menu-driven program using if-else with else if ladder for the following purposes in
accordance with a choice entered by the user: [15]
() Print pattern 1- 1*3 *5
(n) Print pattern 2- #*** #
(ii) Print pattern 3 23456
Display arelevant error message if the user opts for an invalid choice.
[Hint: For printing every pattern, a for loop with 5 repetitions must be included in the program, where the
inítial value of the loop-control variable will be 1and the final value will be 5.]

***END OF QUESTIONPAPER***

Page 5 of r

You might also like