Trending ▼   ResFinder  

ICSE Class X Prelims 2019 : Computer Applications (The Hyderabad Public School (HPS), Begumpet, Hyderabad)

4 pages, 41 questions, 33 questions with responses, 43 total responses,    3    0
Radhika Jawaji
The Hyderabad Public School (HPS), Begumpet, Hyderabad
+Fave Message
 Home > radumasup >   F Also featured on: School Page trinaadhikari

Formatting page ...

Pre-Board-II 2018-2019 COMPUTER APPLICATIONS Class: 10 Time: 2 hr. Date: 29 / 01 / 2019 Max Marks: 100 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. SECTION - A (40 Marks) Attempt ALL questions from the following. Question 1 a) Write a java statement to create an object of BufferedReader and accept a char input using it. b) Differentiate between double and Double. c) Which of these lines will not compile correctly? Give reason(s). short s = 20; float f=1.4; byte b = 128; char c=32; double d=1.4; byte e =0; d) Give the output of the following program segment: (Show Working) double x = 2.9, y = 2.5; System.out.println(Math.min(Math.floor(x), y)); System.out.println(Math.max(Math.ceil(x), y)); e) Identify and name the literals listed below: (i) 0.5 (ii) A (iii) false (iv) A f) How many bits/bytes are occupied by the following primitive data types? (i) long (ii) char (iii) boolean (iv) short Question 2 [1] [1] [2] [2] [2] [2] i) What happens when you add a double value to a String? What will be the output when the following statements get executed? [1] String k = "HPS"+16.25; System.out.println(k); ii) What is the length of the string returned by the call "Hyderabad".substring(3, "Hyderabad".length())? [1] iii) What are input and output streams? [1] iv) Write an equivalent Java expression for the following Mathematical expression. [1] 3 (a+b) |a b| v) Write the conditional statement for the following decision making situation: [2] Provided the value of x is greater than 9, increase the value of y by 15, otherwise decrease the value of y by 36. vi) What will be the value of K when the following expression is evaluated? Determine the hierarchy of operations and show evaluation steps. Page 1 of 4 [2] K=3/2*4+3/8+3 vii) Name the type of conversion in the following: (i) Value 10 and 20.0 stored in int and double variables respectively and their sum is stored in a float variable f. (ii) Int x=32; value A stored in char ch to be added to variable x. Question 3 a) What is difference between SCOPE and Access Specifier of the variable? [2] b) Which arithmetic operations can result in the throwing of an ArithmeticException? [1] c) Rewrite the following code segment using switch statement. if(x==5) { y=y-5; System.out.println( Value of y = +y); } else if(x==10) { y=y-10; System.out.println( Value of y = +y); } else { y=y-15; System.out.println( Value of y = +y); } d) Find the error(s) in the following code fragment and explain. int c=9; { int a=1, b=5; System.out.println(a+" "+b); } System.out.println(c); System.out.println(a+ " "+b); [2] e) What will be the output when the following code snippet is compiled and executed? Show the dry run/working? int i=0; boolean t = true; boolean f = false, b; b=(t && ((i++)==0)); b=(f && (i+=2)>0); System.out.println(i); f) State the output of the following program segment. Show working. String s = "You are capable of more than you know"; int n = s.length(); System.out.println(s.startsWith(s.substring(29, 32))); System.out.println(s.charAt(4) == s.charAt(9)); Question 4 a) Differentiate between byte stream and character stream. [2] [1] [1] [3] [1] b) What is the difference between a break statement and a continue statement when they occur in a loop?[1] c) State the total size in bytes, of the arrays Vowel[5] of char data type and Price[4] of float data type [2] d) Identify and State the type of errors for the following: [2] (i) int j; Page 2 of 4 System.out.println(j); (ii) int a=0,b=10,c; c=b/a; e) Analyze the following program segment and determine how many times the loop will be executed and what will be the output of the program segment? int p=200; while(true) { if(p<100) break; p=p-20; } System.out.println(p); f) What will be the output when the following code snippet gets executed? Show working/Dry run int a[]={5,1,10,2,15,3}; int i,j; int m; i=++a[1]; j=a[2]++; m=a[i++]; System.out.print(i+" "+j+" "+m); [2] [2] SECTION-B (4 X 15 = 60 Marks) Attempt any FOUR questions from this Section. The answers in this Section should consist of the programs in either Blue J environment or any program environment with Java as the base. Each program should be written using comments, Variable descriptions / Mnemonics Codes such that the logic of the program is clearly depicted. Flow charts and algorithms are not required. Question 5 A gaming centre offers its customers to play games for some hours. Define a class Champions_Gaming with the following description: Instance Variables/Data members: String Player_Name To store the name of the customer String G_Name to store the name of the game int hours to store the number of hours the game is played int charge to calculate and store the charge. Member methods Champions_Gaming() Parameterized constructor to assign input values to the variables. void compute() to compute the charge payable. The charge for a game played is charged on the following basis: First 3 hours Rs.300 per hour Next 3 hours Rs.200 per hour Next 3 hours Rs.100 per hour Remaining hours Rs.80 per hour void display() to display the details in the following format Game Name Player Name Charge Payable Write a main() method to call the above member methods by creating necessary objects. Question 6 Design a class to overload a function Draw_Pattern() as follows: Page 3 of 4 [15] i) void Draw_Pattern(int n, char ch) : With one integer argument and one character type argument that draws a filled square of side n using the character stored in ch. ii) void Draw_Pattern(int x, int y) : With two integer arguments that draws a filled rectangle of length x breadth y, using symbol #. iii)void Draw_Pattern(): with no arguments that draws a pattern as shown below * ** *** **** ***** Write a main() method to call the above member methods by creating necessary objects. [15] Question 7 Write a menu driven program to 1) Check whether a number is a Disarium number or an Unhappy Number. 2) Check whether a number is an Emirp Number or not 3) Exit Menu should be displayed as long as the user wants. (A number is said to be Disarium number or Unhappy number, if the sum of its digits powered with their respective position is equal to the original number. (Ex. 135, 175, 89, 518)) (An Emirp number is a number which is prime backwards and forwards. Emirps do not include palindromic primes (like 151 or 787) nor 1-digit primes like 7. ) [15] Question 8 Write a program to input First Name, Middle Name, Last Name, and Age and Generate and Display the Password generated as per the criteria given below: <First Letter and Last Letter of Last Name> <First digit of age> <First and last letter of First name> <Second digit of age> <first and last letter of middle name> Sample Input and Output Name: Stephen William Hawking and Age 76 It should generate: Hg7Sn6Wm [15] Question 9 Store names of 20 world class batsmen with their respective country name and total number of centuries in different single dimensional arrays. The user wants to enlist the cricketers by entering the first letter of a particular country viz. I for India, A for Australia and E for England and so on. Write a program to perform the above task. If found, then display the name of the players with number of centuries, otherwise display Search unsuccessful. Name not enlisted . [15] Question 10 Write a program to read N integer numbers in a single dimensional array and calculate the highest and the least number along with their corresponding positions. [15] For example, if INPUT: 8, 4, 5, 1, 7 OUTPUT: Highest : 8 Position: 1 Lowest : 1 Position: 4 *************** Page 4 of 4

Formatting page ...

Related ResPapers
ICSE Class X Prelims 2025 : Computer Applications (St. Augustine's Day School, Kolkata)
by ankushkum 
ICSE Class X Prelims 2025 : Computer Applications (St. Augustine's Day School, Kolkata)
by hiiuo 
ICSE Class X Prelims 2025 : Computer Applications (Karnataka ICSE Schools Association KISA, Bengaluru)
by donaldduck89 
ICSE Class X Prelims 2025 : Computer Applications (Mary Immaculate School (MIS), Berhampore, Murshidabad)
by itsxoolkid 

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Aquaman- King o...

(38)

Purvam Prajapati

(9)

Aryan Gupta

(7)

Annhaliator

(4)

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 


© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

radumasup chat