0% found this document useful (0 votes)
20 views7 pages

Computer Applications Model Paper for Grade X

This document is a model question paper for Grade X Computer Applications at Sharada Vidyalaya Public School, consisting of two sections: Section A with multiple-choice questions and Section B requiring programming tasks. Students must answer all questions in Section A and any four from Section B, covering topics such as object-oriented programming, data types, and Java programming concepts. The maximum marks for the paper are 100, with a total time allowance of 2 hours.

Uploaded by

omila devi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

Computer Applications Model Paper for Grade X

This document is a model question paper for Grade X Computer Applications at Sharada Vidyalaya Public School, consisting of two sections: Section A with multiple-choice questions and Section B requiring programming tasks. Students must answer all questions in Section A and any four from Section B, covering topics such as object-oriented programming, data types, and Java programming concepts. The maximum marks for the paper are 100, with a total time allowance of 2 hours.

Uploaded by

omila devi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Sharada Vidyalaya Public School

Affiliation No. KA278


Model Question Paper Time:2 hrs
Grade:X Sub:Computer Apllications [Link]
Answers to this Paper must be written on the paper provided separately.
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.
This Paper is divided into two Sections.
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 [20]
Choose the correct answer and write the correct option.
(i) The process of using same function name for carrying different operation is termed as:
(a)Inheritance ( b ) Polymorphism
( c ) Encapsulation (d) A b s t r a c t i o n
(d)
(ii) Which of the following is keyword is used to create an instance of a class ?
(a)new (b)class
(c) public (d) main

(iii) Which of the following is non- primitive data type?


(a) char (b) byte
(c) int (d) String

(iv) The Scanner class is a ___________class.


(a) Primitive (b) super class
(c) Derived (d) Wrapper

(v) Which is not an escape sequence?


(a) \n (b)|| (c)\t (d) \\

(vi) The correct if statement for the following ternary operation statement is:
[Link](n%2 == 0? "true":"false");
(a)if(n%2==0) return true; else
return false;
(b)if(n%2==0) return "true"; else
return "false";
(c)i f ( n % 2 = = 0 )
System. [Link]("true");
else
System. [Link]("false");
(d) if(n%2= =0)
return false
else
return true
(vii) Multiple branching statement of java is:
(a)For (b)while
(c) do…while (d)switch

(viii) Given x + = x++ + ++x + --x


Find the value of x when x=5 :
(a)23 (b) 21 (c) 22 (d) 24

(ix) do.....while loop is an


(a)entry controlled loop (b) exit controlled loop
(b)infinite loop (d) Finite Loop

(x) A java program developed and executed by the users without using web browsers is
known as
(a)application (b)applet
(c) object (d)none

(xi) Java Virtual Machine is an


(a)interpreter (b)machine code
(c) compiler (d) machine code

(xii) int res=’A’. What is the value of res?


(a)65 (b) A (c) 66 (d)97

(xiii) The style of expressing single line comment is:


(a ) /* comment*/ (b) * c o m m e n t
(c) / / c o m m e n t (d) /* comment

(xiv) The method to check if a character is an alphabet or not is:


(a) isLetter(char) (b) isAlpha(char)
(c) isUppercase(char) (d) isLowercase(char)

(xv) Which of the following is a method of a Scanner class is:


(a)nextLine() (b)nextline()
(c)NextLine() (d)Nextline()

(xvi) The method to convert a string to upper case is:


(a)toUpperCase(char) (b) toUPPERCASE(String)
(c) toUpperCase(String) (d) touppercase(String)

(xvii) The output of the method "DETERMINATION".substring(2, 6) is:


(a)"TERM" (b)”TERM1”
( c ) "Term" (d)term

(xviii) The method is invoked through an


(a)Object (b)system
(b)parameter (d)none

(xix) The element in x[4] of the array {3, 5, 7, 12, 16, 18, 20, 35, 42, 89} is:
(a) 16 (b)12 (c) 18 (d)7

(xx) The loop within another loop is called as


(a)Double Loop (c)Embedded loop
(b)Nested loop (d)circular loop
(c)
Question 2
( i ) What is object oriented programming language? Name to object oriented programming
Language. [2]

( i i ) W r i t e j a v a e x p r e s s i o n f o r : x2 + xy [2]

( i i i ) Assign the following to a variable with suitable datatype [2]


a) m=3.14
b) k=”a”
c)n=98
d)r=’s’

(iv) Rewrite the following while loop using for loop: [2]
int x= 5
while(x<5)
{
x++;
}
[Link](x);

( i v ) Predict the resultant datatype of the following: [2]


a)[Link](a);
b)[Link](a,b);

(v)Find the output of following program snippet [2]


a)char c=’B’;
int i=4;
[Link](c+i);
[Link]((int)c+i);

(vi) Define the Single Dimensional Array with its constructs. [2]

(vii) Differentiate between Sorting and Searching techniques on array. [2]


(viii)State the values stored in the variable str1 and str2. [2]
String s1 = “good”; String s2= “World Matters”;
String str1=[Link](5).replace(‘t’,’n’);
String str2 =[Link](str1);
(ix)Write two advantages of using methods in a program. [2]

(x)Debug the errors and rewrite the following method prototypes: [2]
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 [Link] 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
Write a program to accept a mark obtained by a student in computer science and print the
grades accordingly: [15]
Marks Grade
Above 90 A
70 to 89 B
50 to 69 C
below 50 D
Question 4
Write a menu driven program to calculate: [15]

[Link] of a circle = p*r 2, where p = (22/7)


[Link] of a square = side*side
[Link] 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.
Question 5
Write a program to accept a list of 20 integers. Sort the first 10 numbers in ascending order
and next the 10 numbers in descending order by using 'Bubble Sort' technique. Finally, print
the complete list of integers. [15]
Question 6
Write a program to accept a sentence. Display the sentence in reversing order of its word.[15]
Sample Input: Computer is Fun
Sample Output: Fun is Computer
Question 7
Write a program using a function called area() to compute area of the following: [15]
(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 menu drive program to display the pattern as per user choice: [15]
Pattern
ABCDE
ABCD
ABC
AB
A
For an incorrect option, an appropriate error message should be displayed
T23 861 — SPECIMEN 5 of 9

Common questions

Powered by AI

Encapsulation in OOP confines an object's data within a class, controlling access through methods like getters and setters. This approach prevents unauthorized interference and misuse of data, promoting confidentiality and integrity. It enhances software robustness by segregating operations and hiding implementation details, thus protecting data integrity and limiting unintended interactions between modules .

Polymorphism in object-oriented programming allows the use of a single function name to perform different types of operations. This capability is useful in situations where different objects might require different behaviors while sharing a common interface. It fosters flexibility and integration of objects from different classes, for example, enabling various shapes (like circles, squares, etc.) to be treated as generic Shape objects for operations like area calculation .

A do-while loop is an exit-controlled loop in Java, meaning it executes the code block once before checking the loop's termination condition. It's useful in scenarios where the code block needs to be executed at least once regardless of the loop condition. For instance, reading input from a user until a valid data format is provided can be implemented with a do-while loop to ensure at least one input attempt .

Nested loops in programming result in code that executes operations multiple times, corresponding to the depth of the nesting. While they can simplify tasks involving repetitive actions on multidimensional data structures, they significantly increase time complexity, often from linear to quadratic (O(n^2)), thus affecting performance for large datasets. Careful use of nested loops is essential to prevent inefficiency and ensure code remains executable within reasonable time constraints .

Switch statements in Java offer a clear syntax for handling multiple potential values for a single variable, making code more readable and potentially faster than multiple if-else statements. Unlike if-else, which may evaluate each condition, a switch statement directly accesses the case matching the input value, potentially reducing overhead. However, switch is limited to discrete values and cannot handle ranges or complex conditions, where if-else structures offer more flexibility .

Sorting algorithms, such as bubble sort or quicksort, reorder data according to specific criteria, which assists in efficient information retrieval and data processing. Searching algorithms, such as binary search, aim to find the position of a target value within a dataset. Sorting is optimally used for preprocess datasets to facilitate quick subsequent searches, while searching is crucial in situations where quick discovery of specific data is essential, like database queries or finding specific entries .

In Java, converting a string to uppercase is performed using the toUpperCase() method of the String class. This method returns a new string with all characters converted to uppercase, preserving the original string unmodified. It is particularly useful for standardizing string data for operations like comparison where case may vary .

Organizing a Java program into sections, such as through classes, methods, and packages, significantly enhances clarity and manageability. It allows developers to compartmentalize functionality, thereby facilitating the development process by enabling focus on individual modules. This organization also promotes collaborative development, where team members can work on separate sections, minimizing conflicts and enhancing code maintenance .

Using methods in Java has several advantages: they promote code reuse, improve readability by breaking down complex tasks into simpler sub-tasks, and facilitate easier debugging and maintenance. Methods also allow for abstraction, letting programmers hide complex implementation details. However, potential drawbacks include overhead for setting up stack frames on function calls, and excessive fragmentation into methods could lead to disorganized code if not managed well .

Understanding data types is crucial because they determine the operations that can be performed on the data, the storage space required, and how it gets interpreted by the system. Choosing an incorrect data type can lead to logical errors or inefficient use of memory. For instance, using an integer to hold a floating-point number would truncate the decimal part, leading to inaccurate results, while using a larger data type than necessary wastes memory .

You might also like