Trending ▼   ResFinder  

ICSE Class X Prelims 2019 : Computer Applications (Vikas Bharti School, Gorakhpur)

6 pages, 38 questions, 14 questions with responses, 14 total responses,    2    0
Vikas Bharti
  
+Fave Message
 Home > sanjeevvbs >   F Also featured on: icse

Formatting page ...

Vikas Bharti School Bhartipuram, Gorakhpur Mock Trials 2019 (Set - A) COMPUTER APPLICATIONS (Two Hours) 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 (40 Marks) Attempt all questions Question 1: a) Why do we need a constructor as a class member? [2] b) Name the following: [2] i. A package that is invoked by default. ii. A key word, to use the classes defined in a packeage. c) What is the difference between length and length( ) function? [2] d) Give the prototype of the function Sum which receives a character (ch) and an integer (n) and returns true or false. [2] e) What is an infinite loop? Give one example of infinite loop statement. [2] Question 2: a) If int arr[ ]= {2,6,9,4,7,10,3,5,11}; what will be values of X and Y? X= arr.length; Y= (arr[2] + arr[4] *arr[6]); b) Give the output of the following: a+= a++ + ++a + -- a + a--; when a =10; c) Give the output of the following: String S= Make in India ; String SS= Made in India ; i. System.out.prinln(S.compareTo(SS)); ii. System.out.prinln(S.substring(0,4)+SS.substrig(5)); d) Arrange the given primitive data types in an ascending order of their size. char, int, byte, double e) Name any two OOP s principles. f) Rewrite the following program segment using if..else statements: String grade = (mark>=90)? A :( mark>=80)? B : C ; g) Differentiate between switch statement and if..else statement. h) Write the java expression for: ut + 3/4ft2 + g3 i) What is the data type that the following library functions return? [2] [2] [2] [2] [2] [2] [2] [2] [2] j) i. isWhitespace( char ch) ii. Math.random( ) Give one example of primitive data type and composite data type. Question 3: a) Differentiate between call by value and call by reference. b) What is the difference between / and % operators. c) Name the keyword that: i. Informs that an error has occurred in an input/output operation. ii. Distinguishes between instance variables and class variables. d) Find the values stored in X and Y: double a= -56.35, b= 14.58; i. double X=Math.abs(Math.ceil(a)); ii. double Y=Math.rint(Math.max(a,b)); e) State one difference between the floating point literals float and double. [2] [2] [2] [2] [2] SECTION B (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 Variable descriptions/Mnemonic Codes so that the logic of the program is clearly depicted. Flow-Charts and Algorithms are not required. Question 4. Write a program to accept the year of graduation from college as an integer value from the user. Using the Binary search technique on the stored array of integer given below, output the message Record Exists , if the value is located in the array. If not, output the message Record does not exists . [15] int arr[ ]={1982,1987,1993,1996,1999,2003,2006,2007,2009,2010}; Question 5. Using the switch statement, write a menu driven program to calculate the maturity amount of bank deposit, the user is given the following options: [15] a. Term Deposit b. Recurring Deposit For option (a), accept principal (P), rate of interest (r), and time periods in years(n). Calculate and output the maturity amount (A) using the formula: A= P[1+r/100]n For option (b), accept monthly installment (P), rate of interest (r), and time periods in years(n). Calculate and output the maturity amount (A) using the formula: A=Px n(n+)/c x r/100x 1/12 For an incorrect option, an appropriate error message should be displayed. Question 6. Write a program in to print the following pattern: 1 1 1 1 2 2 1 1 3 3 3 1 1 4 4 4 4 1 5 5 5 5 [15] 1 5 1 Question 7. Define a class Purchasing_Bill with the following specifications: Class : Purchasing_Bill Instance variables/data members: String n : to store the names of the customer int units : to store the number of items double bill : to store the amount to be paid Member methods: void accept( ) : to accept the name of the customer & number of items consumed void calculator( ) : to calculate the bill as per the following tariff: Number of items Rate per items First 100 items Rs. 120:00 Next 200 items Rs. 130:00 + Rs. 1500 Above 300 items Rs. 150:00 + Rs. 1800 A surcharge of 2.5% charged if the number of items purchased is above 300 items. void print( ) : to print the details as follows: Name of the customer: [15] Number of items purchased: .. Bill amount: .. Write a main method to create an object of the class and call the above member methods Question 8. Write a program in java to input a number and check whether it is Karoker number or not. Take a positive whole number n that has d number of digits. Take the square of n and separate the result into two pieces: a right-hand piece that has d digits and right- hand piece that has either d or d-1 digits. Add these two pieces together. If the result is n then the number is Kaprekar number otherwise not. [15] 2 e.g. 45 (45 = 2025= 20 +25=45) 297 (2972 = 88209 = 88+209=88297) Question 9. To foster a sense of water conservation . The water department has an annual water conservation tax policy. The rates are based on the water consumption by the consumers, the tax rules are as follows: Water consumed in Gallons Tax rate in Rs. [15] More than 45 but less than 75 or less 475.00 More than 75 but less than 125 or less More than 125 but less than 200 or less More than 200 but less than 300 or less 750.00 1225.00 1650.00 More than 300 2000.00 Write a program to display water conservation tax based on the input ( water consumed) by the user. Mock Trials 2019/Form A/ Set A/ SKG/013

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Tubhyam Mehta

(14)

ResPaper Admins

(1)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

sanjeevvbs chat