Wednesday, March 19, 2014

Sample Question No. 4 for IP - Informatics Practices ( AISSCE 2014 ) _ B


[2+2+3+3]


ABC School uses the following interface built in java to check the eligibility of a student for a particular stream from science, commerce and humanities. The user first enters the total percentage and selects the desired stream by selecting the appropriate option button. An additional 5% is marks is given to students of NCC.



Write Java Code for the following
(a) On the Action event of the close button the application gets closed.

(b) On the Action event of the clear button all the text fields and the check boxes get cleared.

(c) On Action event of the button ‘Calc Percentage’ Net percentage of the student is calculated and displayed in the appropriate text filed. Net percentage is same as that of the actual percentage if the student doesn't opts for NCC otherwise 5% is added to actual percentage.

(d) On Action Event of the button ‘Result’, the application checks the eligibility of the students and display result in the appropriate text field. Minimum percentage for science is 70, for commerce 60 and humanities 40.

Sample Question No. 4 for IP - Informatics Practices ( AISSCE 2014 ) _ A

Sample Question No. 4 for IP - Informatics Practices ( AISSCE 2014 ) _ A


[1+1+1+2+2+2+6]

(a) What is Interfaces in Java? What pupose does it solve?

(b) Differentiate between function overloading and method overriding.

(c) Write the purpose of the following statements:
      (i) int n = Integer.parseInt(“1254”);
      (ii) System.exit(0);

(d) Rewrite the following code using while loop:
      int i,j=15;
      for(i=1; i<=6 ;i++)
      System.out.println(i++);
      System.out.println(“Finished !!!!”);

(e) The following code has some error(s). Rewrite the correct code underlining all the corrections made.
      int y =6,p;
      do
      (y=3.14*y;
      p=y%10;
      if p=2
      System.out.print(“Two”);
      while (y>1)

(f) What will be the content of jTextField1 and jTextField2 after executing the following code:
      String st=”New to Information Technology”;
      jTextField1.setText(st.replace(“Technology”.”Practices”);
      jTextField2.setText(st.substring(7));

(g) Tina and Payal works in a construction company. To calculate total wages he has developed the following GUI in NetBeans.





Male and female laboures are respectively paid Rs. 200/- per day and Rs. 240/- per day. Skilled labourers are paid extra at the rate of Rs. 200/- day. Male and female laboures from rural areas are paid 10% less per day.
I.                    Write the code to lock the text box. ( text box for total wages should not take input)
II.                  Write code to do the following-

(a)              When Calculate Wage button is clicked, the total wages is calculated as per the given criteria and displayed in total wage text box.
(b)               When Clear button is clicked, all the text boxes should be cleared and radio button, check box should be deselected.
(c)                Close the application when Quit button is pressed.


Sample Question No. 3 for IP - Informatics Practices ( AISSCE 2014 ) _ B

Sample Question No. 3 for IP - Informatics Practices ( AISSCE 2014 ) _ B



[2+2+1+1+2+2]

(a) What is the purpose of ALTER TABLE command?

(b) Why do we use ROLLBACK statement? Explain in brief with the help of an example.

(c) After creating the “school” database you want to use it. Write the command that you should give.

(d) Explain the two wildcard character – and % used with the LIKE clause.

(e) What are joins? Why are they used?


(f) What is the importance of group function in MySQL?

Sample Question No. 3 for IP - Informatics Practices ( AISSCE 2014 ) _ A

Sample Question No. 3 for IP - Informatics Practices ( AISSCE 2014 ) _ A


Q. No. 3   [1+1+1+1+2+2+2]

(a) Which MySQL command helps you to create database if it does not exist?

(b) How can we see the list of existing DATABASES?

(c) Pragati created a table named Item, She wants to see those items whose price is between 150 and 890. She wrote a query-
           SELECT * FROM Item WHOSE price > 150 OR <890;
Help pragati to run the query by removing the errors from query by rewriting it.

(d) Joshi wants to implement check constraint in the tables being created. How he can use constraint give example?

(e) What is the role of primary key in the table? Explain with the help of suitable example.

(f)  Room_No, Cust_Name, Room_type and Room_Rent of table “HOTEL” are given below:
 Room_No
Cust_Name
Room_type
Room_Rent
204
Ravi
Single
650
308
Tina
Double AC
1400
105
Anita
Single NAC
900
202
Pratibha
Single NAC
800

Based on this information, find output of the following queries:
(i)                  SELECT Room_Type, SUM(Room_Rent) FROM hotel GROUP BY Room_type;
(ii)                SELECT Room_no FROM hotel WHERE Cust_Name LIKE ‘%a%’;


(g) Define Degree and Tuple.