0% found this document useful (0 votes)
50 views21 pages

COMPUTER Class 10

practice paper of computer class 10 icse

Uploaded by

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

COMPUTER Class 10

practice paper of computer class 10 icse

Uploaded by

abiachintya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 21
/ Somali Quer TE eae i frame tsesceebi vain FIRST TERMINAL EXAMINATION: 2022-23 FULL MARKS: 100 COMPUTER APPLICATIONS STD. X A/B/C/D/E TIME: 2 Hrs. “Answers to this paper must be written on the paper provided separately. You will not allowed to write during the first 15 minutes. This time is to be spent in reading the question paper. The time is given at the head of this Paper is the time allowed for writing the answers. This Paper is divided into two Sections. "A and any four questions from Section B. The intended ‘Attempt all questions from Section jiven in bracket [ ] ‘marks for questions or parts of questions are 9 SECTION- A (40 MARKS) Question 1 Choose the correct answer and write the correct option. (i) Which of the following keyword is used to create an instance of aclass? {a) new {b) public (c) class Vil tale (d) non of these (ii) What are the final value stored in variable x ? Double 8.35; Double x =Math.abs(math floor(a)); (a) 9.0 (0) 7.0 (96 (7 (ii) The logical operator which is an unary operator: (a) && (b) o! (d) >> COMPUTER APPLICATIONS aN ~ (iv) The Scanner class is a. class. {a) Primitive (b) Derived {c) Wrapper (2) super class (vy) Math.pow(2,3}+Math.sqrt(64) (a) 12.0 (b)12, (co). (a9 %, (vi) The correct if statement for the following ternary operation is: system.out.printin(n%2==0? “true” :"false”): {a) tf(n%2==0) return true; else return false; (b) 11(n%2==0) return “true”; else return “false”; (e) if(n%2==0) system.out.printin(“true”}; Else system.out.printin(“false”}; (4) ifln962: return false; else return true; (vi) Multiple branching statement of java is: (a) For {b) While {c) do... while (d) switch (vii) The number of bytes occupied by the constant 45 are: {a) Four bytes (b) Two bytes {c) Eight bytes (a) One byte (ix) &) (xi) (xii) COMPUTER APPLICATIONS. do... While loop is an {a) Entry control loop (b) Infinite loop (e) Exit control loop (d) Finite loop For(m=1;m<=4;m++) { System.out.printin(m*2); } a) (a) 4times (b) 8 times {c) 2 times (a) 16 times A method with the same name as of the class and with argument and no return data type is termed as: {a) Parameterized constructor (b) Default constructor (c) Non-parameterized constructor (d) Wrapper class method int res=’A’; what is the value of res? a) A b) 66 ce) 65 4) 97 (xii) The style of expressing single line comment is: (xiv) {a) /* comment */ {b) *comment {e) // comment {d) /* comment Name the type of error that occurs for the following statement: System.out.printin(Math.sqrt(24 ~ 25); 31 (xv) {a) Syntax error {b) Run time error {e) Logical error (d) No error Logical AND operator symbol is: (a) && (b) II ()! (d) !: (xvi) Math.ceil(79.2) (xvii (xviii) (xix) (xx) Question 2 (a) 80.0 (b) 79.0 (c) 78.5 (d) 79.2 i) Math.floor(78.8) (a) 79.0 (b) 80.0 (0) 78.0 (d) Non of these The size of double data type is: (a) 80 bytes (b) 8 bytes (c) 10 bytes (d) 64 bytes Which of the following is a selecting statement ? (a) goto (b) if (c) for (d) none of these Which of the following is a looping statement? (e) for (b) break (of (d) None of these Evaluate the expression : atte teat tata (i) (wv) we wv) (wi) (vii) COMPUTER APPLICATIONS Write the expression for Sete Rewrite the following using ternary operators: if(x> y) cA; else ca Rewrite the following while loop using for loop: int x=5; while(x<=5) { xe; } System.out.printin(x); How many times the following loop will gets executed ?What is the output of the same? Int counter=1; do { ‘System.out.printin(counter); } while(counter++<5); Define constructor ? Consider the following program and answer the question given below: class sample {int a,b; sample(int x, int y) sen Zeatb; System.out.printin(z); } } (2) Name the global variables (b) What are the method variables? COMPUTER APPLICATIONS. (vill) Write the syntax of if else-if else statement. (i) Write the difference between while and do while. (%) Write the difference between method and constructor. SECTION-B [60 MARKS] Attempt any four questions from this Section. The answer of this Section should consist of the program in either Blue J environment or any program environment with java is the base. Each program should be written using variables descriptions/Mnemonic codes so that the logic of the program is clearly depicted. Flow-chart and algorithms are not required. Qyfestion 4. [a5] Define a class salary descrived as below- Data members : Name, Address, phone, subject specialization, monthly salary, income tax. Member methods: i) To accept the details of a teacher including the monthly salary. ii) —_Todisplay the details of the teacher. iii) To compute the annual income tax as 5% of the annual salary above Rs. 175000. Question 5. Define a class named FruitJuice with the following descripti Instance variables/data member int product_code: stores the product code number String flavor: stores the flavor of the juic String pac-type: stores the type of packaging. int pack_size: Stores package size. Int product_price: Stores the price of the product. Member methods: . (i) Fruitjuice() : default constructor to initialize integer data members to 0 and String data members to “". (ii) Void input() : to input and store the product code, flavor, packtype, pack size and product price. (iii) Void discount{): To reduce the product price by 10. (iv) Void display(): to display the product code, flavor, pack type, pack size and product price. Question 6: [15] 6| Write a program inj Java to print th © following patt e area COMPUTER APPLICATIONS Pattern 1 Y using switch case statement: Pes Pattern 2 teens F; eens on wees wee teens sees For incorres i im Ct option an appropriate error message should be displayed. Question 7, (15) Write in j it a program in java to print the following pattern by using switch case statement: Pattern 1 Pattern 2 : 1 23 ic 456 Ics 78910 ICSE 1112131415 Question 8. [15] Write a class with the name Foverload using function overloading that computes the: Volume of a cube = S*S*S (S=side) Volume of Cylinder = pi* r*r*h (pi=3.14,r=radius, h=helght) Volume of cuboid = (I*b*h) (I=length, b=breath, h=height) _Aluestion 9: [15] Using switch case statement , write a menu driven programming to do the following: (a) To generate and print Letters from A to Z and their Unicode. Letters Unicode A 65 B 66 90 71 sn nn oeesens~ COMPUTER APPLICATIONS c se eed ement: (b) To display the following pattern using iteration state 1 12 123 1234 12345 Oe 81 bedladaksadudele er oe FIRST PREUMINARY EXAMIMATION: COMPUTER APPLICATIONS (THEORY) std, x Time: Two hours Full Marks: 108 AMET to this paper must he wiitten on the paper podded wpnoely. You Wil not awed to write during the fick 15 mirates, ; This thine is to be spent in reading the question paper. The time is given at the head of this Poper is the time allowed for writing the oneWers. This Paper ie divided ita tua Section Attempt all questions from Section A ond amy four quecticns from Section B. The: intended marks for question: or parts of questions are given in tracket {J SECTION: 6 (40 MBBS) Question 1 Choose the correct anvwer and write the corre option. (203 (i) Which ts not a true statement about array? (a) An array expands autornaticalty when ttf full (b) An array ic allowed to certain duplicate valves. (c) Aa array understands the concect of ordered elements. (0) han array uses 2 2er0 index to reference the first element (ii) Give the output of the following statement. String snyStr4 = “Hell; String mnyStr2 = “Hello”; System ost printin(rm/strLcomparevo(nn/str2)); (ajo (b) 1 (j2 (4) 14 (ii) Array 1s 8 none data type (a) integer {b) String (¢) composite (6) sized (iv) Which of the following concept can be used for encapsulation? (a) Wrapping cata fields with methods. ermal methods using acess modifiers in a class. » {b) Hiding data and int {c) Using interfaces . (a) Allof the above. (v)__ Give the output of the following functions. String x="Computer"; string y="Applications"; ssystem.out.printin( xindexOfl xch fa) 4 (b) 5 (3 (a) 2 (vl) Which of the following methods can be used to join two strings? (a) trim() (b) concatenates( ) (c) concat{) (d) joint) (vii) What is the final value stored in variables x? double x= Math. abs (- 7.3)); (a) 7.0 (b) 8.0 () 6.0 (a) 9.0 (vill) tt is a composit (a) class (b) object (6) integer (2) array (ix) To declare a method in java, (a) Modifier (b) Return type (c) Method name {d) All of these (x) The keyword to create an object ofa class is (a) create (b) new (c) New (4) NEW (xi) ItIsused to implement class behavio arat( 4 ))): e data type because It requires to use its attributes choose the required components. rs that are not affected by the state of any instance. {a) static keyword (b) static data member athe, My = : ; 8) Agtee oa s Ba e ee ae Y & (c) static method (d) none of these 5 Constructor’s syntax does not include a) return type b) class name c)_ parenthesis d) All of these xii) Which following can be usec ther constructor in the same class? (xiii) Which of the following can be used to invoke another constructor in th t (xiv) (xv) (xvi) evil) (xvii) (xix) (a) new() (b) static( ) {c) this (d) complex ‘These statements can be used to modify the behavior of conditional and iterative statements. (a) Jump statements (b) Iterative statements (c) Selection statements {d) Switch statements. The concept of having more than one constructor with different types of parameters. {a) Copy constructor (b) Method overloading (c) Constructor overloading (d) Overloading In java we can call function through (a) 3 ways (b) 4. ways (c) 5 ways (d) None of these Math.floor(78.8) (a) 79.0 (b) 80.0 (@) 78.0 (d) None of these The size of double data type Is: (a) 80 bytes (b) 8 bytes (c) 10 bytes (d) 64 bytes Which of the following Is a selecting statement? {a) goto (e) if (©) for (d) none of these A (xx) Which of the following is the correct usage? (a) int af-40); (b) int af4o); (c) float af0-40}; (d) None of these Question 2 to] (i) Evaluate the expression : Msat+ +-- bt tat Where 2=5,b=5,2=2; (ii) Write the expression for #828 (ii) Rewrite the following using ternary operators: iffx>y) (iv) Difference between while loop and do while loop. (vy) Ifa=; 5, find the value of a+=b++ *5/at++ +b (vi) What wil the following functions return? (2) Math.round(Math.pow(2.5,3); (b) Math.abs(Math.max(-25,25)}; (vii) Give the output of the following string functions: (a) “LANGUAGE” replace (‘A’, ‘0’); (b) “PROGRAM”. compareTo("Programme”); (vil) _ Write the return type of the following library functions : (a) istetterOrbigit(char) (b) replace(char,char) (x) Write the difference between while and do while, () Differentiate between the following program segments and also give their output : (a) while(++i<5) fel; ‘Systern.out.printin(f); (b) int f=1, i=2; do { fal; } System.out.printin(f); SECTION-B [60 MARKS} 15 Attempt any four ; questions from this Secti The answer of this Section should consist of the area Section. ier Blue J environment or a : ny Program environment with java is the base. Each progr i ir Program should be written using variables descriptions/Mnemonic codes so that the logic of the program is clearly depicted. rae Flow-chart and algorithms are not required. [15] Design a class names it , - Stringname = To store name of the customer String type To store the type of room that customer wants to double mobno: to store customer's mobile number int amt : ‘to store basic amount of room. inttotalamt + to store the amount to be paid after updating the original amount. Member Methods: void accept(): To take input for name, type, mobile number and amount . void update( ): to update the amount as per type selected (extra amount to be added in the amount as follows ) TYPE OF ROOM AMOUNT Full_AC 4000 Partial_AC [3000 Cooler 2000 Normal 1000 Void display( To display all the details of a customer such as name, type, total amount and also mobile number. Write » main method to create an object of the class and call the above member methods. Suestion 4. 115) Define a class to accept two strings of same length and form a new word in such a way that, the first character of the first word i followed by the first character of the second word and so on. Example : Input String 1- BALL Input String 2- WORD OUTPUT: BWAOLRLD Question 5: (35) Define a class to accept a string and print the characters with the uppercase and lowercase reversed, but all the other characters should remain same as before. EXMAPLE: INPUT : WelCoMe_2022 OUTPUT: wELcOmE_2022 Question 6. (15) Write a program in java to print the following pattern by using switch case statement: Pattern 2 Pattern 2 1 B 23 BL 456 BLU 78910 BLUE 3112131415 BLUEJ Question 7: 115) Define a class to perform binary search on a list of integers given below, to search for an element input by the user, if it is found display ‘the element along with its position, otherwise display the message “Search element not found”. 2,5,7,10,15,20,29,30,46,50 [15] Question Write a program to input twenty names in an array. Array these names in descending order of alphabets, using the bubble sort technique. COMPUTER APPLICATIONS (THEORY) Std.X Time: Two hours Full Marks: 100 Answers to this paper must be written on the paper provided separately. You will not allowed to write during the first 15 minutes. This time is to be spent in reading the question paper. The time is 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 bracket [ ] SECTION- A (40 MARKS) Question 1 Choose the correct answer and write the correct option. (i) Which of the following keyword is used to create an instance of a class? (@) new (b) public (©) class (d) non of these (ii) What are the final value stored in variable x ? Double a=- 8.35; (iii) The logical operator which is an unary operator: (@) && (b) ©! (>> (iv) The Scanner class is a class. (@) Primitive (b) Derived (@) Wrapper (d) super class @) Math pow(2,3)+Math.sa(60 (a) 12.0 (p12 ou (a9 (vi) The correct if statement for the foll false”); lowing ternary operation is: System.out.printin(n%2==0? “true”: (@) 1n%2=0) return true; else retum false; (b) 1f(n%2==0) return “true”; else return “false”; (©) if(n%2==0) System.out.printin Else System.out.printin(“false”)s (& if(a%2—0) return false; else return trues Multiple branching (a) For (b) While (©) do... while (d) switch The number of bytes occupied by the constant 45 are: (2) Four bytes (b) Two bytes (c) Eight bytes (d) One byte (“true”); (vii) statement of java is: (viii) do.... While loop is an (a) Entry control loop (b) Infinite loop (©) Exit contro loop @ Finite loop () Gi) Gii) RAR hLICe TIONS 13 for(k=1;k<=2:k++) { For(m=1m<=4;m++) { System.out printin(m*2); } } (@) 4 times (©) 8 times (©) 2 times @ 16 times ‘A method with the same is termed as: @) Parameterized constructor (b) Default constructor (©) Non-parameterized constructor (@ Wrapper class method int res~’A’; what is the value of res? a A b) 66 2 65 d) 97 ame as ofthe class and with argument and no return data type (sity The style of expressing single line comment is: (xiv) (xv) (@ /* comment */ (b) *comment (©) / comment (@ /* comment ‘Name the type of error that occurs for the following statement: System.out printin(Math.sqrt(24 -25)) (a) Syntax error (b) Run time error (©) Logical error (d) No error Logical AND operator symbol is: (a) && ) Il ©! @ (xvi) Math.ceil(79.2) (@) 80.0 (b) 79.0 (©) 78.5 (6) 79.2 (xvii) Math.floor(78.8) (@) 79.0 (&) 80.0 © 78.0 (@) Non of these ; (xviii) The size of double data type is: (@) 80 bytes ©) 8 bytes (©) 10 bytes (@) 64 bytes Which of the following is a selecting statement ? (@ goto &) if (©) for @ none of these Which of the following is a looping statement? @ for (b) break Olt (@ None of these (xix) (ox) Question 2 (i) Evaluate the expression : att+++at+ata Where a=10; poamtl2s/Z = Wirt (ii) Write the expression for (iii)Rewrite the following using ternary operators: iffx> y) A. else a’; Gv)Rewrite the following while loop using for loop: int x= while(x<=5) STO. » COMPUTER APPL toh Ae ER ATIONS [5 } System.out.printIn(x); (v) How many times the following loop will gets executed ?What is the output of the same? Int counter=1; do { Systeme peut while(counter++<5); (vi)Define constructor 2 (vii) Consider the following program and answer the question given below: class sample {int a,b; sample(int x, int y) Z=atb; System. out-println(z); 3 } (@) Name the global variables (b) What are the method variables? (viii) Write the syntax of if else-if else statement. (ix) Write the difference between while and do while. (x) Write the difference between method and constructor. SECTION-B [60 MARKS] ‘Attempt any four questions from this Section. ‘The answer of this Section should consist of the program in either Blue J environment or any program environment with java isthe base. Bach program should be written using variables descriptions/Mnemonic codes so that the Question 4. [15] Define a class salary described as below- Da embers : Name, Adklress, phone, subject specialization, monthly salary, income tax. ete oo AIO” ego he eS nm “ 185 16 Member methods: Fee eee epe the details of a teacher including the monthly salary. 596 of the annual salary above Res, 175000, ts} lay the details of the teacher. fhe annual income tax as to search for an element ‘otherwise display the i) Todi iit) To compu Question 5. ‘ 1 Betine a class to perform binary scarch on a list of integers given below input by the user, if it is found display the element along with Kes positions message “Search element not found”. 2,8,7,10,15,20,29,30,46,50 ust Question 6: Jind and display the following: Write a program to input a sentences. Number of words present in the sentence. Number of letters present in the sentenee. Assume that the sentence has neither include any digit nor a spe 115} Question 7. Define a class to accept a string, convert it into lowercase and check whether the string is a palindrome or not. A palindrome is a word which reads the same backward as forward Example: madam, racecar etc. 151 Question 8. Write a class with the name Foverload using function overloading that computes the: S*S*S (S=side) Volume of a cub 14,e-radius, h=height) Volume of Cylinder = pi* r*r*h (pi (*bth) (length, b=breath, height) Volume of cuboid y 4 o - ER AL T 7 io 115) yang witch case statement , write a menu driven programming to do the following: (a) To generate and print Letters from A to Z and their Unicode Letters Unicode 65 B 66 Zz 90 (b) To display the fllosing patter using teraionstatemeor 1 12 123 1234 12345 eeusnennnnenscensnessgeenneee i eeeente eeeeaeeeeee BEST OF LUC penenensensoeen™

You might also like