Trending ▼   ResFinder  

ICSE Class IX Mid-term 2021 : Computer Applications (The Frank Anthony Public School (FAPS), Bangalore)

3 pages, 23 questions, 0 questions with responses, 0 total responses,    2    0
Aditya Chakraborti
The Frank Anthony Public School (FAPS), Bangalore
X PCM with Computers
+Fave Message
 Home > adityac10 >   F Also featured on: School Page icse9

Instantly get Model Answers to questions on this ResPaper. Try now!
NEW ResPaper Exclusive!

Formatting page ...

THE FRANK ANTHONY PUBLIC SCHOOL, BANGALORE COMPUTER APPLICATION CLASS 9 FIRST TERM EXAMINATION (2020-2021) Total Marks : 80 Reading Time : 15 min No. of Printed Pages : 3 Writing Time : 2 hrs Section A (Attempt all the questions) Question 1 [2x5] a) Give Java statements for the following: i) To accept a character to the variable ch from the keyboard ii) To check if the String s is equal to FAPS (It should work for all the case) b) Switch-case works only on two types of data. What are they? c) How is a Byte code different from Native Executable Code? d) Name the expression which contains different data types. Also, give an example. e) Name the package in which the class Scanner is present. Write a statement to include that package in your program. Question 2 [2x5] a) Differentiate : i) Entry control loop and Exit Control loop b) Arrange the following operator in ascending order of precedence i)+ ii) * iii)++ iv) ?: v) <= vi) && v) = vi) ! vii) % viii) > c) Arrange the datatype in the increasing order of memory allocation i)char ii) int iii) float iv) byte v) long vi) boolean vii) short viii) double d) If the value of s = -5. Find s += ++s * s++ + s e) Write a statement to correct the following type conversion: int n = (float) a / b ; Question 3 a) Convert the following statement with Ternary operator to conditional statement [2] System.out.println((a % 2 == 0 && a % 3 != 0) ? a+" Even number": a+ "is an Odd number"); b) What is the value of s and a when in each of the following statements are executed. Assume the initial value of a = 3 [2] i) s = ++a ii) s = a c) Classify the following as valid or invalid Identifiers [2] i)A_b4 ii) %fun iii) $Sum iv) 4good d) Convert the following switch statement to Conditional statement [3] switch(c) { case 1: case 2: case 3: System.out.println("Hello"); break; default: System.out.println("Not Hello"); } 1 d)Convert the following while loop to do-while loop [3] int c=2; while( c <= 10 ) { c += 2; System.out.println("c+100"); c++; } e) Give the output of the following code when i)a = 500 ii)a=501 [2] int a=500; if(a ++ > 500) System.out.println(a+500); else System.out.println(a-200); f) Give the output of the following loop [3] int a=10; while( a > 5 ) { System.out.println(a+3); a--; --a; } g) Dry run the following code and give the number of times the loop is executed. [3] int a = -3; while( a <= 3 ) { System.out.println(a); a=a+2; } Section B (Answer any four Questions) (Write Mnemonic name or variable list for all the program) Question 5 [10] Write a program to create a class called Library where the books are borrowed. Accept mobile number, String name, cost of the book and number of days the book is borrowed. Calculate the amount to be paid based on the condition: Number of days Rate per day For first 7 days Rs. 2 For the next 7 days Rs. 3 greater than 14 days Rs. 5 Print the result in the following format: Mobile no. : --------- Name: -----2 Number of Hours : ------ Bill amount: ------Repeat the whole process as long as the user wants Question 6 Write a menu driven program using switch case to print the following: 1. To print 10 multiples of table 5 2. To print 10 multiples of table n(Accept n) 3. To print all the even numbers till n(Accept n) [10] Question 7 Create a class named Purchase to accept mobile number, name and the amount purchased. Calculate discount based on the following conditions: [10] Amount Purchased Discount <=5,000 10% of the amount purchased >5000 and <=10,000 Rs.1000+3% of the amount purchased >10,000 Rs.1500+5% of the amount purchased Also, calculate the amount Paid = Amount purchased - discount Print all the information in a neat format: Mobile Number Name Amount Purchased Discount Amount Paid ---------------------------------Repeat the whole process n times Question 8 Write a menu driven program to print the following series using switch-case: 1. 3/10 6/8 9/6 12/4 15/2 2. -5 -3 -1 0 2 4 6 8 10 [10] Question 9 [10] Accept name and average of students. If the average is greater than 80 then print the name and the average of the student in tabular form as given below. Name Average --------------Repeat the process as long as the user wants ----------------------------------------------------------------------------------------------------------------- 3

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

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

 

adityac10 chat