Sample Question No. 5 for IP - Informatics Practices ( AISSCE 2014 ) _ B
[2+2+2+2+1+2+1+3]
Answer the following questions:
(a) What will be the output of the following code
snippet?
int x=10;
int y=20;
if((x<y) || (x=5)>10)
System.out.println(x);
else
System.out.println(y);
(b) Find the syntax errors if any in the following
programme:
int I ; sum = 0;
i=1;
while(i=<10)
{
Sum=sum+I;
i=i+3
}
System.println(sum);
(c) Rewrite the following switch statement using
if-else statement and display the result using appropriate IDE.
switch(number)
{
case 1:
jLable2.setText(“digits”);
break;
case 10:
jLable2.setText(“Tens”);
break;
case 1000:
jLable2.setText(“Thousands”);
break;
default:
jLable2.setText(“error”);
break;
}
(d) What is difference between jRadioButton and
jCheckBox?
(e) Write the method used to set some value in the
label.
(f) What is JDBC-ODBC in Java? Name the package that
provides SQL Driver for java.
(g) Differentiate between UL and OL tags used in HTML?
(h) Create a page about your hobbies (at List three
hobbies). On the page include link to interesting sites that coincides with you
description. For instance, if you like sports, you might create a link to http://cnn.com/SPORTS/
for the benefit of your users.