Trending ▼   ResFinder  

CBSE Class 11 Pre Board 2019 : Informatics Practices (St Xavier's Sr. Sec. School, Delhi)

3 pages, 28 questions, 0 questions with responses, 0 total responses,    0    0
Cbse 11
  
+Fave Message
 Home > cbse11 >   F Also featured on: School Page

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

Formatting page ...

Std. 11 16-2-2019 Annual Examination in INFORMATICS PRACTICE 1. Write any two differences between each of the following :a) b) c) d) e) f) g) Time : 3 hrs. Max. Marks : 70 [14] setText() and append() Sequential construst and Selective Construct System.out.print() and System.out.println() ? : and if..else statement jRadioButton and jCheckBox controls switch case and Multiple if else Operator = and Operator == 2. a) What happens if break is not written in switch..case statement? What name is given to this concept? [2] b) What is the significance of default statement is switch..case? Will the program generate error if default is not written in switch..case? [2] c) What is ternary operator? Explain with example. [2] d) Write the datatype name for the following values: [2] i) H ii) K iii) 89.67 iv) -45 e) Which control is used to group the jRadioButtons? Draw its icon. [2] f) What values can be stored in Boolean datatype? [1] 3. Write output of the following:a) int A=200 , B=250; String S1= INFORMATICS ; System.out.println( +A+B); System.out.println(S1.charAt(0)); System.out.println(S1.charAt(5)); System.out.println( +(A+B)); [4] b) switch( house ) { case T : jTextArea1.append( Tagore-Yellow ); case G : jTextArea1.append( Gandhi-Green ); case B : jTextArea1.append( Bhabha-Blue ); break; case N : jTextArea1.append( Nehru-Red ); default : jTextArea1.append( Not a valid House ); } What will be the output if the value of variable house is : i) N ii) G iii) B iv) H [6] c) int G = Integer.parseInt( jTextField1.getText() ); if ( G >=75 ) { if ( G >= 95 ) System.out.println( Excellent ); } else System.out.println( Can do better ); [3] if the input given for jTextField1 is : i) 82 ii) 98 iii) 61 4. Convert the following:a) if .. else to switch .. case String s1=jTextField1.getText(); char grade= s1.charAt(0); if (grade == 'A') jTextField1.setText( "Excellent" ); else if (grade == 'B') jTextField1.setText( "Better luck next time!" ); Std. 11 -2- [3] INFORMATICS PRACTICE else if (grade == 'C') jTextField1.setText( "Hard Luck" ); else jTextField1.setText( "Consider switching major..." ); b) Conditional operator to if .. else String s= jTextField1.getText(); int D = Integer.parseInt(s); jLabel1.setText( + ( D%4==0 ? "Divisible by 4" : "Not Divisible" )); 6. Find errors in the following programs :a) float N1 = Float.parse( jTextField1.getText() ); SWITCH( N1 ) { case 1 : System.out.println ( @@@ ); case 5.2 : System.out.println ( ### ); case 1 : System.out.println ( %%% ); case 7 : System.out.println ( &&& ); Default : jTextArea1.Append( invalid ); } b) Int i, j=5; i==j+5; if(i=j) ; { jTextField1.setText( i and j are unequal ); jTextField2.setText( they are not equal ); } else jTextField1.setText( i and j are equal ) [2] [3] brake; [2] 7. Design the frame and write coding for :a) jButton1 to join the messages written in jTextField1 and jTextField2 and display the result in jTextField3 [2] b) jButton2 to clear the jTextField1 and jTextField2 [1] c) jButton3 to exit the jFrame [1] 8. Design the frame and add the values typed in jTextField1, jTextField2 and jTextField3 and display the result in jTextArea1 [3] Std. 11 -3- INFORMATICS PRACTICE 9. Calculate DA, HRA, Gross, Tax, Net-Salary, Annual-Salary and Monthly-Tax and store the result in respective jTextFields based on the salary inputted in jTextField2 [5] Da = 50% of Salary Hra = 30% of Salary Gross = Salary + Da+ Hra Annual Salary = Gross * 12 Total Tax = Monthly_Tax * 12 Monthly Tax = 10% of Net_Salary Net_ Salary = Gross tax 10. Write coding to print the month name by checking the month number from the user in jTextField1 ( 1 for JANUARY, 2 for FEBUARY So on up to the month of JUNE only). Print message in a dialog box. ( using Multiple if else..) [4] 11. Write coding to calculate discount from the cost entered in jTextField1 using conditional operator ( ?:). If total cost is greater than 5000 discount given is 20% otherwise the discount given is 10% on cost of cloth. [3] 12. Write the coding for jButton to check the greater number of two numbers entered in jTextField1 and jTextField2 print the greater in jLabel3. [3] -X-X-X-X-X-X-

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 


Tags : cbse class xi, cbse 11, cbse 11th standard, cbse mock papers, cbse sample papers, cbse books, portal for cbse india, cbse question bank, central board of secondary education, past cbse question papers with answers, prelims preliminary exams, pre board exam papers, cbse model test papers, solved board question papers of cbse last year, previous years solved question papers, free online cbse solved question paper, cbse syllabus, india cbse board sample questions papers, last 10 years cbse final exam papers, cbse question papers, cbse guess sample questions papers, cbse important questions, specimen / mock papers.  

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

 

cbse11 chat