Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

Computer Applications

The document outlines the structure and content of a pre-board examination for Computer Applications at Aurobindo Patha Bhavan, Cooch Behar, for the academic year 2024-25. It includes various types of questions related to Java programming, including multiple-choice questions, coding exercises, and theoretical concepts. The exam is divided into two sections, with specific instructions on answering and time management.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
16 views

Computer Applications

The document outlines the structure and content of a pre-board examination for Computer Applications at Aurobindo Patha Bhavan, Cooch Behar, for the academic year 2024-25. It includes various types of questions related to Java programming, including multiple-choice questions, coding exercises, and theoretical concepts. The exam is divided into two sections, with specific instructions on answering and time management.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 7
AUROBINDO PATHA BHAVAN (ENGLISH MEDIUM), COOCH BEHAR PRE-BOARD EXAMINATION 2024-25 COMPUTER APPLICATIONS ‘Maximum Marks: 100 Time ellowed: Two Hours “Answers to this Poper mus be writen on the paper provided seperately ‘You wil not be allowed to write during the fst 15 minutes. This time isto be spent in reading the question paper. The time given at the head of ths Poper Is the time allowed for writing the answers. This Paper's divided nto two Sections. ‘Attempt ol questions from Section and any four from Section B. The Intended marks for questions or parts of questions are given In brackets J Question 1. Choose the correct option and write, Ql. Read the following statements careflly: Statement I Ob. nextint( isthe appropriate method to accept a 10-digit phone number. Statement II: Ob. nextDouble( is net the appropriate method to accept a 10-diit phone number. Statement Ill The String valueOf(n).JengthQ retums the numberof digits in a given number. Which of the above Statement()isfare correct A, Mand Ill only. B. Monly. ©. Land I only. D> All Statements are Correct. ll. Read the following statements careflly: Statement I: Tn Java, a logical error may cause a program to rash Statement I: The method to convert an ft toa string isin toSting(aray)- Statement Il: In Java, a reference parameter i a parameter passed by value. Which ofthe above Statements) is/are corect A. Tonly B. Land Ul only. © Lonly. D. All Statements are Correct QIIL Which ofthe following isfare valid array declaration statements in Java? char gender) = new ehar() char gender= new char(), char gender] = new chart MT]; char genderf) = new char{80]; QIV. In Java, you often encounter an error when you ty t offen refered 10 a8, ‘A. Logical Error B. Syntax Error C> Run Time Error 4 D. Linkage Error pap> an integer by a zero. Ths type of errors \5/PB-2024/X/COMPUTER APPLICATION 7 y es sLice s 1 QV. Which o the following methods reins a boolean value? i) endsivitng, compareTo() iit) cquals() iv) ength) A. aly i) B. onlyii) & iv) C: only) & ii) D. only ii) QVL. Assertion (A): Data abstraction in Jova allows hiding the implonyentation details of «class from the user. Reason (R): Data abstraction is nchioved in Java through inheritance ‘A: Assertion is true, Reason is false. B. Assertion is truc, Reason is tru, . Assertion is false, Reason is false. 'D. Assertion is false, Reason is true. QVM, The output of the statement Math.ceil (-9.9)+Math.rint(14.5) ist AS BAS cso D.-50 QVM. The oxipat ofthe statement of “universe”, index OMe) is AS B2 cA D4 QIK. Which ofthe following isan example of implicit type casting in Java? ‘A. double mum = 10.5; int result= (int) nur; Br int num = 10; double result = num; CC, float letter =3.2; int num = (int) letter; D. float num = 3.14f; byte result= nu; OX. Which of the following statements is tus abou primitive date types in Java? "A. A float data type can store values with more precision than a double, BL The char datatype ean hold values ftom 0 to 65,540, CC. The long datatype i used to store very lange floating numbers. Ds Anint datatype has a size of 32 bits in Java, COXA, Arrange the following datatypes in descending order based on their storege copnlty = ‘) long A. i iii) B. iv), ii), i) i) C> il) iv) i) D. i), ii) i) iv) oa, ‘ost il be the ouput: Sytemout pine fase ls); tue B. false ©. enor Do (QUILL, Predict the correct output : Public class stringTest { public static void main(stringl] args) ¢ String stri = "Jav String str? = new String("Java"); String str3 = "Java" system.out.printin((strt (stri.equals(str2)) + "" + (strt = stray +" "+ str3))i > A. false true true B. false false false true tre false D, true false true QXIV. Predict the output : J 5 I 5 > |> [> [> <|< |< |< > |> [> l> “Transpose the above 2-d array named AI] and find the result if A(O}(0) , ACII(1.A(2I2). AIS] are printed in a line. JAVA B. IVAA c AAS D. VAAT QXV. Ramesh wants to calculate the sum of the cube of x and the square root of y. Identify the coréct Java ‘expression forthe aforesaid calculation. "A. Matb.cube(x) +Math.00t(y) B, Math cbr(x) + Math.sqr(y) C, Math pow(x,3) + Math squareroot(y) D> Math pow(x,3)¥Math.sqrt(y) ‘QXVI. A delivery company charges for shipping based on the weight of the package. The company policy is to round up the weight ofthe package to the nearest whole number (in kilograms) and then charge $10 per salogram, For example: + Apackage weighing 23 kg will be charged as ifit weighs 3 kg, + Apackage weighing 5.0 kg will be charged as $ kg. ‘Which Math class function wil uscful to handle weight conversion in case we write a java program for aforem ‘Ay Matcound() B. Mathloor() ©. Mathaint() D. Mathecil() ‘QXVIL. Which of the following is NOT a wrapper cass in Fava? A, Integer B. Float ©. Boolean Dz String QAVIIL A function FIG( ) accepts one integer and a word, Upon invocation, the function retums a lete. Which one ofthe following will be a correct prototype of the function FIG( )? A. String FIG( byte b , WORD") B. Char FIG( int x, “WORD') int FIG( “Word”, 3) D. char FIGC int, Sting WORD) A. Polymorphism B. Encapsulation Cr Abstraction D. Inheritance (QXX.. What kind of pattem will this code produce when executed? for (int 4 = 0; i < 10; itt) ( for (int J 4 < 10; 544) € af (A+ j= 9) 4 system.out. print ("#"); } else { system.out.print(" "); d > system, out.printin(); y ‘A. Asightangle triangle BAsquare . An inverted right-angled triangle D: A diagonal line y i) Vy frvesion io / ip ii Ey) » vi wii) vit) \nswer the following questlons : (0x2~20) Ao eecountant want to find ou the number ‘of employees from Delhi working in the company. Fill in the ans ia the given program sogment wih appropri av sateen: void count(string employeet ]) ¢ System.out. printIn(ent); ? ‘The output ofa program which extracts a part ofthe string “INWARDNESS" ig as follows: ("INWARD "WARD" ‘Wat appropriate Java statement to get tbe above outputs Wit Java statements forthe following: (a) Initalze an aray withthe thee fetes with appropriate data type, ( ntizea variable with Bolean value with eppropriste datatype, How many ines the given oo for( int ist ; £ System.out.println(i); > Siate the output: double k = -Hath.cei1(-3.7) + Hath.pow(4,1/4) ‘Write the output ofthe following code: public class Code { public static void main (Stringt] args) { for(int i= 0; 4 < 4; it) { System.out.printin(i+! i) What isthe value of variable int five = 5; int two = 2; Ant total = Five + (Five > 6 7 s+two 1 -=two); Convert the following fr loop segment oan exitcontoled lop, for(p=t0; p>= =1;p- ~) System, out, printin(py2); /- 8) Predict the ouput forthe following code / String 8 = "newspaper"; a = a.substring(s, 7); | / char b = ascharat(1); a +b; System.out.printin(a); %) Evaluate the expression when the value of x =2: Ce errr anen Section -B 7 {Ademptany four questions from this section, Each question ts of 15 marks, Candidate must provide a variable description table forthe question attempted] ae Define a class called withthe following specifications: name: Eshop Member variables: Swing uame: Nam ofthe item purchased luble price: Price ofthe item purchased “Member methods: ‘id seeen): Accept the name and te price ofthe item using the methods of Scaner cas. void cave) To “Calculate the net amount to be paid bya customer, based onthe following extra: Price Discount 1000-25000 5.0% 25001-57000 7.5% ‘s7001~ 100000 10.0% Morethan 100000 15.0% ‘oid disolay( To display the name of the item and the net amount tobe paid’ ‘Woite the main method to create an object and cal the above methods, | esa sk mabe W ss Moon une dit eo gs hese nena Fc eam | “ome Moran aunbers are 18,21, 27, 42,45 and soon Write java program to accept omumber and verity ifthe sven ‘umber isa Moran number or no. Input: N=34 Ourput: No Input: N= 21 Output: Yes tion §, Write a program to accept valucsin an integer array of size 10, Sort them in an ascending order using ‘selection sor technique. Display the sorted array. ‘Question 6, Write a program to create a 3x3 matrix and fill with integer values. Check ifthe marx isa magic ‘square oF not, A magi square is formed when sum of each row is 15, sum ofeach column is 15 and sum cach Giagonalis elo 15. An example of a magic square i given below : foot Sri ‘ program to input a string in upper case and replace all the vowels with an Asterisk (*) present in ¢ Input : TATA STEEL IS IN JAMSHEDPUR Output: T*T* STL I* J*MSH*DP*R Question 8. Define a class to overload the method that performs as follows : ‘oid compate(int Al ])- to display sum of smallest and largest value. Example: (4,5, 16, 6,12, 9) Largest 16 Smallest: 4 Summ of Largest and Smallest vale is: 20 void perform (String , chat ch) : Ifeb ie pnt only be Gs and ls character itch pat he ter ecg the st and ast character Example: = “Computer” che Output: Cr chet Output: ompute : ve perforin): to pit the sum of lhe digits and prodt of ll the digits. Example: ifn= 1031 Product of di

You might also like