You are on page 1of 7

‫ دﺑﻲ‬, ‫ﻣﺪرﺳﺔ ﺟﯿﮫ اس اس اﻟﻌﺎﻟ ِﻤﯿﺔ‬

JSS INTERNATIONAL SCHOOL, DUBAI

1st Term End Examination, 2023-2024


GRADE: XI Max Marks: 70
Duration: 2 hrs

COMPUTER SCIENCE

Revision Sheet

Portion
Chapter 1: Numbers
Chapter 4 : Unit 1. Object Oriented Programming
Chapter 4:Unit 2. Objects and Classes
Chapter 4: Unit 3. History and Development of Java
Chapter 5: Concept of Data Types
Chapter 5: Concept of Data Types
Chapter 6: Operators and Expressions
Chapter 7:Conditional and Looping Statement
(Theory)

Maximum Marks: 70 Time Allowed: Three hours

(Candidates are allowed additional 15 minutes for only reading the paper.

They must NOT start writing during this time).

Answer all questions in Part I (compulsory) and six questions from Part-II, choosing two questions
from Section-A, two from Section-B and two from Section-C.

All working, including rough work, should be done on the same sheet as the The intended marks for
questions or parts of questions are given in brackets [ ].

PART I – 20 MARKS
Answer all questions.
While answering ques ons in this Part, indicate brie y your working and
reasoning,wherever required.

ti

fl

Ques on 1
[10]

(i) The base of a Hexadecimal number is represented by:

1. H16

2. 16

3. 15

4. None

(ii) To express a Hexadecimal number to its Binary equivalent, each Hexadecimal digit
is expressed into:

1. 2 bits form

2. 3 bits form

3. 4 bits form

4. None

(iii) Which of the following keywords is used to create an instance of a class?

1. new

2. public

3. class

4. main

(iv) In a Hexadecimal number system 'B' represents the digit:

1. 11

2. 12

3. 14

4. 13

(iv) The process of combining data and functions that enables them to be together as a single
entity is called

1. inheritance

2. encapsulation

ti


3. classi ication

4. attributes

(v) Which of the following is a blue print that creates objects of similar types?

1. abstraction

2. encapsulation

3. class

4. function
(vi) What is object oriented programming? Name two object oriented programming languages.

[1]

(vii) What is meant by a base class and a derived class? [1]

(viii) In what way is static declaration different from dynamic declaration? [1]

(ix) Distinguish between Syntax error and Logical error. [1]

(x) In what way is Data Hiding related to Data Abstrac on? [1]

Ques on 2
[10]
(i) Define the Polymorphism following with an example . [2]

(ii) Perform the following arithmetic [2]

a. Add hexa-decimal numbers (1F5C)16 and (AC2B)16

b. Subtract octal number (2546)8 from (5142)8

(iii) Answer the following: [2]

a) If int y =10 then find int z = (++y*(y++ + 5));

(b) What is meant by the Coercion?

(iv) What are the resulting data types, if the following conversions are performed? [2]

(a) int i; float f; double d; char c; byte b;

i + c/b;

(b) Predict the output

(v) Convert the following [2]

ti
f











ti























a. (ABC)16= ()10

PART II – 50 MARKS

Answer six questions in this part, choosing two


questions fromSection A, two from Section B and two
from Section C.
SECTION - A
Answer any two questions.

Question 3. [10]

(i) Answer the following [5]

a. (3402)8 to ( )2 [2]

b. Subtract hexa-decimal number (A68D)16 from (D53F)16 [2]

c. Write a Java expression for the following: [1]

(ii) Answer the following [5]

a. Convert the following to their binary equivalents

1. (999)10 [2]

2. (165.35)10 [2]

b. What do you understand by Token? Name different types of tokens used in Java.
[1]

Question 4. [10]

(i) Write down the constructs (syntax) of: [4]

(a) Nested do-while loop

(b) Nested while loop

And Explain with the help of example.










(ii) How will you convert: A decimal number to a binary number [2]

(iii) What will be the output of the following code? [2]

int m = 2;

int n = 15;

for(int i = 1 ; i < 5 ; i++)

m++;

--n;

System.out.println(" m = " + m);

System.out.println(" n = " + n);

(iv) Give two differences between: Hexa-decimal and Octal number [2]

Question 5. [10]

(i) What is the purpose of using following statements in a program: [2]

(a) break statement

(b) continue statement

(ii) Explain the following functions. [2]

(a) Math.cbrt()

(b) Math.log()

(iii) Distinguish between Math.ceil() and Math.floor(). [2]

(iv) What is meant by an infinite loop? Give an example. [2]

(iv) Explain the term type conversion. How is implicit conversion different from explicit
conversion? [2]

SECTION – B

Answer any two questions.

Each program should be written in such a way that it clearly depicts the logic of the
problem. This can be achieved by using mnemonic names and comments in the program.

(Flowcharts and Algorithms are not required.)


The programs must be written in Java.

Question 6. [10]

An air-conditioned bus charges fare from the passengers based on the distance travelled as
per the tariff given below:

Distance Travelled Fare

Up to 10 km Fixed charge ₹80

11 km to 20 km ₹6/km

21 km to 30 km ₹5/km

31 km and above ₹4/km

Design a program to input distance travelled by the passenger. Calculate and display the
fare to be paid.

Question 7. [10]

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 8. [10]

Write a menu driven program to calculate:

1. Area of a circle = p*r2, where p = (22/7)

2. Area of a square = side*side

3. Area of a rectangle = length*breadth

















Enter 'c' to calculate area of circle, 's' to calculate area of square and 'r' to calculate area of
rectangle.

SECTION – C

Answer any two questions.

Each program should be written in such a way that it clearly depicts the logic of the
problem stepwise. This can be achieved by using comments in the program and
mnemonic names or pseudo codesfor algorithms. The programs must be written in Java
and the algorithms must be written in general / standard form, wherever required /
specified.
(Flowcharts are not required.)

Question 9. [5]
:

The volume of a sphere is calculated by using formula:


v = (4/3)*(22/7)*r3
Write a program to calculate the radius of a sphere by taking its volume as an input.
Hint: radius = ∛(volume * (3/4) * (7/22))

Question 10. [5]

A certain amount of money is invested for 3 years at the rate of 6%, 8% and 10% per
annum compounded annually. Write a program to calculate:

1. the amount after 3 years.

2. the compound interest after 3 years.

Accept certain amount of money (Principal) as an input.


Hint: A = P * (1 + (R1 / 100))T * (1 + (R2 / 100))T * (1 + (R3 / 100))T and CI = A - P

Question 11. [5]

Write a program to compute and display the sum of the following series:













You might also like