{"id":6581,"date":"2023-03-14T10:00:48","date_gmt":"2023-03-14T04:30:48","guid":{"rendered":"https:\/\/www.aplustopper.com\/?p=6581"},"modified":"2023-03-14T09:41:38","modified_gmt":"2023-03-14T04:11:38","slug":"icse-previous-papers-solutions-class-10-computer-applications-2013","status":"publish","type":"post","link":"https:\/\/www.aplustopper.com\/icse-previous-papers-solutions-class-10-computer-applications-2013\/","title":{"rendered":"ICSE Computer Applications Question Paper 2013 Solved for Class 10"},"content":{"rendered":"
ICSE Paper 2013<\/span> (Two Hours)<\/em><\/strong> Section \u2018A\u2019 (40 Marks)<\/span><\/p>\n (Attempt all<\/strong> questions)<\/em><\/p>\n Question 1:<\/strong> Answer:<\/strong> (b)<\/strong> Literals also called constants which are data items that remain fixed during the execution of a Program.<\/p>\n (c)<\/strong> (i) Inheritance (d)<\/strong><\/p>\n (e)<\/strong> (i) explicit type casting Question 2:<\/strong> Answer:<\/strong> (b)<\/strong><\/p>\n (c)<\/strong> For finding length of character array char [ ] we use, a.length (d)<\/strong> (i) Void Keyword (e)<\/strong> An Exception is an abnormal condition that arises in a code sequence at runtime. Error might be because of :<\/p>\n Question 3:<\/strong> (b)<\/strong> State the values stored in the variables str 1 and str 2 (c)<\/strong> What does a class encapsulate ? [2]<\/strong><\/p>\n (d)<\/strong> Rewrite the following program segment using the if ..else statement (e)<\/strong> How many times will the following loop execute ? What value will be returned ? (f)<\/strong> What is the data type that the following library functions return ? (g)<\/strong> Write a Java expression for ut + \\(\\frac { 1 }{ 2 } \\) at2<\/sup>.\u00a0 [2]<\/strong><\/p>\n (h)<\/strong> If int n [ ] = {1, 2, 3, 5, 7, 9, 13, 16}, what are the values of x and y ? (i)<\/strong> What is the final value of ctr when the iteration process given below, executes ? (j)<\/strong> Name the methods of Scanner class that: Answer:<\/strong> (b)<\/strong> str1 = \/manners (c)<\/strong> Java provides an access control mechanism whereby classes can restrict or allow access to it\u2019s variables and methods. A class should protect variables against direct manipulation by other objects if those manipulation could change the object state.<\/p>\n (d)<\/strong> if (sale > 15000) (e)<\/strong> 5. (f)<\/strong> (i) This method returns a boolean. (g)<\/strong> (u * t) + (1\/2 * a * t * t).<\/p>\n (h)<\/strong> x = 343 (i)<\/strong> The final value of ctr = 15<\/p>\n (j)<\/strong> (i) Byte Stream Section \u2018B\u2019 (60 Marks)<\/span><\/p>\n Attempt any four<\/strong> questions from this Section.<\/em> Question 4:<\/strong> Member methods : Answer:<\/strong> Question 5:<\/strong> Answer:<\/strong> Question 6:<\/strong> Answer:<\/strong> Question 7:<\/strong> Answer:<\/strong> Question 8:<\/strong> Answer:<\/strong> Question 9:<\/strong>
\nCOMPUTER APPLICATIONS<\/span><\/p>\n
\nAnswers to this Paper must be written on the paper provided separately.<\/em>
\nYou will not be allowed to write during the first 15 minutes.<\/em>
\nThis time is to be spent in reading the question paper.<\/em>
\nThe time given at the head of this Paper is the time allowed for writing the answers.<\/em>
\nThis paper is divided into two Sections.<\/em>
\nAttempt all<\/strong> questions from Section A<\/strong> and any four<\/strong> questions from Section B<\/strong>. <\/em>
\nThe intended marks for questions or parts of questions are given in brackets [ ].<\/em><\/p>\n
\n(a)<\/strong> What is meant by precedence of operators ? [2]<\/strong>
\n(b)<\/strong> What is a literal ? [2]<\/strong>
\n(c)<\/strong> State the Java concept that is implemented through: [2]<\/strong>
\n(i) a superclass and a subclass.
\n(ii) the act of representing essential features without including background details.
\n(d)<\/strong> Give a difference between a constructor and a method. [2]<\/strong>
\n(e)<\/strong> What are the types of casting shown by the following examples ? [2]<\/strong>
\n(i) double x = 15.2;
\nint y = (int) x;
\n(ii) int x = 12;
\nlong y = x;<\/p>\n
\n(a)<\/strong> Operator Precedence determines the order in which expression are evaluated, Precedence can be changed by placing parentheses around the expression that needs to be evaluated first.<\/p>\n
\n(ii) Abstraction<\/p>\n\n\n
\n Method \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/strong><\/td>\n Constructor<\/strong><\/td>\n<\/tr>\n \n A method is a code sequence designed to do a specific task.<\/td>\n A Constructor is a special code sequence which is called automatically when object is created.<\/td>\n<\/tr>\n \n A method can be invoked by specifying method name followed by the argument.<\/td>\n A constructor is called automatically.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\n(ii) implicit type casting.<\/p>\n
\n(a)<\/strong> Name any two wrapper classes. [2]<\/strong>
\n(b)<\/strong> What is the difference between a break statement and a continue statement when they occur in a loop ? [2]<\/strong>
\n(c)<\/strong> Write statements to show how finding the length of a character array char [ ] differs from finding the length of a String object str. [2]<\/strong>
\n(d)<\/strong> Name the Java keyword that :
\n(i) indicates that a method has no return type.
\n(ii) stores the address of the currently-calling object. [2]<\/strong>
\n(e)<\/strong> What is an exception ?<\/p>\n
\n(a)<\/strong> (i) Integer
\n(ii) Character<\/p>\n\n\n
\n Break Statement<\/strong><\/td>\n Continue Statement<\/strong><\/td>\n<\/tr>\n \n Break statement is a Jump statement. It is used to terminate a switch\/for\/while and do while statement.<\/td>\n Continue statement transfer the control to the beginning of the loop and skips the rest of the loop body<\/td>\n<\/tr>\n \n Break followed by the label name is used to break out of the loop with the label by it.<\/td>\n Continue statement is used to force an early Iteration of a loop.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\nEx: char [ ] a = {\u2018a\u2019, \u2018b\u2019};
\nr = a.length;
\noutput: 2
\nFor finding length of string object str, we use, str.length ( );
\nEx : String str = \u201cMy\u201d;
\nint k = str.length ( );
\noutput: 2<\/p>\n
\n(ii) This Keyword<\/p>\n\n
\n(a)<\/strong> Write a Java statement to create an object mp 4 of class digital. [2]<\/strong><\/p>\n
\nString s1 = \u201cgood\u201d; Strings s2 = \u201cworld \/ matters\u201d;
\nString str 1 = s2. substring (5). replace (\u2018t\u2019, \u2018n\u2019);
\nString str 2 = s1. concat (str 1); [2]<\/strong><\/p>\n
\ncomm = (sale >> 15000) ? Sale \u00d7 5\/100 : 0; \u00a0[2]<\/strong><\/p>\n
\nint x = 2, y = 50;
\ndo {
\n++ x;
\ny – = x ++;
\n} while (x < = 10);
\nreturn y; \u00a0[2]<\/strong><\/p>\n
\n(i) isWhitespace (char ch)
\n(ii) Math.random() \u00a0[2]<\/strong><\/p>\n
\nx = Math.pow (n[4], n [2]);
\ny = Math.sqrt (n[5]+n[7]; \u00a0[2]<\/strong><\/p>\n
\nint ctr = 0;
\nfor (int i = 1; i < = 5; i ++)
\nfor (int j=1; j < = 5; j + = 2)
\n++ ctr; \u00a0[2]<\/strong><\/p>\n
\n(i) is used to input an integer data from the standard input stream
\n(ii) is used to input a String data from the standard input stream. [2]<\/strong><\/p>\n
\n(a)<\/strong> digital mp4 = new digital ( );<\/p>\n
\nstr2 = good\/manners<\/p>\n
\ncomm = sale*5\/100;
\nelse
\ncomm = 0;<\/p>\n
\n15.<\/p>\n
\n(ii) This method returns a double value.<\/p>\n
\ny = 5<\/p>\n
\n(ii) Character Stream<\/p>\n
\n The answers in this Section should consist of the Programs in either Blue J environment or any program environment with Java as the base.<\/em>
\n Each program should be written using Variable descriptions\/Mnemonic Codes so that the logic of the program is clearly depicted.<\/em>
\n Flow-Charts and Algorithms are not required.<\/em><\/p>\n
\nDefine a class named Fruit Juice with the following description: [15]<\/strong>
\nInstance variables \/ data members :
\nint product_code \u2014 stores the product code number
\nString flavour \u2014 stores the flavour of the juice (E.g. orange, apple, etc.)
\nString pack_type \u2014 stores the type of packaging (E.g. tetra-pack, PET bottle, etc.)
\nin pack_size \u2014 stores package size (E.g. 200 ml, 400 ml, etc.)
\nin product_price \u2014 stores the price of the product<\/p>\n
\n(i) FruitJuice() \u2014 Default constructor to initialize integer data members to 0 and String data members to.
\n(ii) void input( ) \u2014 To input and store the product code, flavour, pack type, pack size and product price.
\n(iii) void discount( ) \u2014 To reduce the product price by 10.
\n(iv) void display() \u2014 To display the product code, flavour, pack type, pack size and product price.<\/p>\n
\n
\n
\n<\/p>\n
\nThe International Standard Book Number (ISBN) is a unique numeric book identifier which is printed on every book. The ISBN is based upon a 10-digit code. The ISBN is legal if:
\n1 \u00d7 digit1<\/sub> + 2 \u00d7 digit2<\/sub> + 3 \u00d7 digit3<\/sub> + 4 \u00d7 digit4<\/sub> + 5 \u00d7 digit5<\/sub> + 6 \u00d7 digit6<\/sub> + 7 \u00d7 digit7<\/sub> + 8 \u00d7 digit8<\/sub> + 9 \u00d7 digit9<\/sub> + 10 \u00d7 digit10<\/sub> is divisible by 11.
\nE\u00d7ample : For an ISBN 1401601499
\nSum = 1\u00d71 + 2\u00d74 +3\u00d70 + 4\u00d71 + 5\u00d76 + 6\u00d70 + 7\u00d71 + 8\u00d74 + 9\u00d79 + 10\u00d79 = 253 which is divisible by 11.
\nWrite a program to :
\n(i) Input the ISBN code as a 10-digit integer.
\n(ii) If the ISBN is not a 10-digit integer, output the message, \u201cIllegal ISBN\u201d and terminate the program.
\n(iii) If the number is 10-digit, extract the digits of the number and compute the sum as explained above.
\nIf the sum is divisible by 11, output the message, \u201cLegal ISBN\u201d. If the sum is not divisible by 11, output the message, \u201cIllegal ISBN\u201d. [15]<\/strong><\/p>\n
\n<\/p>\n
\nWrite a program that encodes a word into Piglatin. To translate word into a Piglatin word, convert the word into uppercase and then place the first vowel of the original word as the start of the new word along with the remaining alphabets. The alphabets present before the vowel being shifted towards the end followed by \u201cAY\u201d.
\nSample input (1) : London, Sample output (1) : ONDONLAY
\nSample input (2) : Olympics, Sample output (2) : OLYMPICSAY [15]<\/strong><\/p>\n
\n<\/p>\n
\nWrite a program to input 10 integer elements in an array and sort them in descending order using the bubble sort technique. [15]<\/strong><\/p>\n
\n
\n<\/p>\n
\nDesign a class to overload a function series ( ) as follows :
\n(i) double series (double n) with one double argument and returns the sum of the series,
\n
\n(ii) double series (double a, double n) with two double arguments and returns the sum of the series.\u00a0[15]<\/strong>
\n<\/p>\n
\n
\n<\/p>\n
\nUsing the switch statement, write a menu driven program :
\n(i) To check and display whether a number input by the user is a composite number or not (A number is said to be a composite, if it has one or more than one factor excluding 1 and the number itself).
\nExample : 4, 6, 8, 9
\n(ii) To find the smallest digit of an integer that is input.
\nSample inputs: 6524
\nSample output: Smallest digit is 2
\nFor an incorrect choice, an appropriate error message should be displayed. [15]<\/strong><\/p>\n