Nothing Special   »   [go: up one dir, main page]

Std. 12 Max. Marks: 70: Informatics Practice

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Downloaded from https:// www.studiestoday.

com

INFORMATICS PRACTICE
Std. 12 Max. Marks : 70

1. a) A school with 20 stand-alone computers is considering networking them together and adding

om
a server. State 2 advantage of doing this. [1]
b) Distinguish between LAN and WAN.[1]
c) What is the purpose of Modem in network?[1]

c
d) Write one example of IP Address.[1]

y.
e) Define 'Domain Name Resolution'.[2]
f) Name two threats to security in a network. What is the role of Firewall in Network security? [2]

da
g) Draw the diagram of star topology and give one advantage of it. [2]

2. a) Write the value of variable 'e' after execution of the following code: [1]
int d;
int e;
to
es
d=7;
e = (5* ++d) %3;
di

b) What is the difference between jTextField and jPasswordField components?[1]


c) In a SWITCH statement, what is the purpose of 'default' statement? [1]
tu

d) Which HTML tag is used to: [1]


i) Change the font of the page
.s

ii) Create a table


e) Write Java code to assign the value 79.5 to variable A. Increase the value of A by 5.5 and
w

store it in variable B. [2]


w

f) Write the output that will be generated by the code given below: [2]
int x;
//w

x = 7;
int r;
r = 8;
s:

while (x<=10)
{
tp

System.out.println(r*x);
x +=2;
ht

}
g) "With XML, there are no predefined tags" - Explain in brief with the help of an example. [2]

3. a) What is MySQL? [1]


b) Is NULL value the same as 0 (zero)? Write the reason for your answer. [1]
c) Write the UPDATE command to increase the commission (Column name: COMM) by 750 of
all the salesman who have achieved Sales (Column name: SALES) more than 159000. The
table's name is COMPANY. [1]
d) While using SQL pattern matching what is the difference between ' _ ' underscore and '%'
wildcard symbols? [1]
e) Name the SQL Commands used to:[2]

Downloaded from https:// www.studiestoday.com


Downloaded from https:// www.studiestoday.com

i) Undo the transactions done upto the save point B1


ii) Display all the database present in MySQL.
f) Write one similarity and one difference between CHAR and VARCHAR data types. [2]
g) What is a Transaction? Which command is used to make changes done by a Transaction
permanent on a database? [2]

om
4. a) The following code has error(s). Rewrite the correct code uderlining all the corrections made:
int n=5, int i=1, f=1; [2]
do;
{

c
f=f*1;

y.
i++;
while(i<=n)

da
jTextField. setText(" "+f);
b) How many times will the following WHILE loop execute? [2]
int y = 5, sum = 0;
while (y<= 10) to
es
{
sum = sum + y;
y = y+2;
di

}
tu

c) Rewrite the following program code using IF ELSE IF instead of SWITCH statement: [2]
String tour;
.s

int c1 = Integer.parseInt(jTextField1.getText( ));


switch (c1)
w

{
case 8 : tour = "\n You are going to Camp Ramgarh";
w

break;
case 9 : tour = "\n You are going to Manali, Rohtang Pass";
//w

break;
case 10: tour = "\n You are going to Chail";
break;
s:

default: tour = "No School tour for you this time";


tp

}
d) Write the value of s and x after execution of the following code: [2]
ht

int s, x;
s = 7;
x = 5;
s = s + (x++);
e) What will be the contents of jTextField1 and jTextField2 after executing the following code: [2]
String a = "Best";
jTextField1. setText(a.length( )+" ");
jTextField2. setText(a.toupperCase( ));
f) The students of "Shiksha Vidyalaya" work for different extra curricular activities like
'Community Outreach Programme', 'Swachh Bharat Abhiyan' and 'Traffic Safety Club'. The
Programmer at the school has developed a GUI application as shown below:

Downloaded from https:// www.studiestoday.com


Downloaded from https:// www.studiestoday.com

Shiksha Vidyalaya
Enter Roll Number

Enter Name

om
 Community Outreach Programme

 Swachh Bharat Abhiyan

c
y.
 Traffic Safety Club

da
Calculate Total Score Stop Clear

Total Score to
es
 A student can participate in more than one activities.
 Each student gets 10 points for each activity - namely Community Outreach
di

Programme, Swachh Bharat Abhiyan and Traffic Safety Club.


tu

Help the programmer to write code for the following:


i. When 'Calculate Total Score' button is clicked, the points for each activity (that is
.s

selected) should be displayed in the text field in front of that activity's checkbox and
the
w

Total Score should be displayed in the appropriate Text field. [3]


ii. When Clear button is clicked, all the TextFields and Checkboxes should be cleared. [1]
w

iii. When Stop button is clicked, the application should close. [1]
//w

5. a) Distinguish between Single Row and Multiple row functions of MySQL. Write one example
of each. [2]
b) Consider the following table named "SOFTDRINK". Write commands of SQL, for (i) to (iv)
s:

and output for (v) to (vii).


tp

Table: SOFTDRINK
DRINKCODE DNAME PRICE CALORIES
ht

101 Lime and Lemon 20.00 120


102 Apple Drink 18.00 120
103 Nature Nectar 15.00 115
104 Green Mango 15.00 140
105 Aam Panna 20.00 135
106 Mango Juice Bahaar 12.00 150
i. To display names and drink codes of those drinks that have more than 120 calories. [1]
ii. To display drink codes, names and calories of all drinks, in descending order of
calories. [1]
iii. To display names and price of drinks that have price in the range 12 to 18
(both 12 and 18 included) [1]

Downloaded from https:// www.studiestoday.com


Downloaded from https:// www.studiestoday.com

iv. Increase the price of all drinks in the given table by 10%; [1]
v. SELECT COUNT (DISTINCT (PRICE)) FROM SOFTDRINK;
[1]
vi. SELECT MAX (CALORIES) FROM SOFTDRINK;
[1]
vii. SELECT DNAME FROM SOFTDRINK WHERE DNAME LIKE "%Mango%";

om
[1]
c) What is the degree and cardinality of 'SOFTDRINK TABLE'? [1]

6. a) Write MySQL command to create the Table 'LIBRARY' with given constraints. [2]

c
Table: LIBRARY

y.
COLUMN_NAME DATATYPE(SIZE) CONSTRAINT

da
BookId Int(10) Primary Key
BookName Varchar(40) Not Null
Type Char(4)
Author
No_Copies
Varchar(40)
Int(6) to
es
Price Decimal(8, 2)
b) In a Database Company, there are two tables given below:
di

Table: SALES
SALESMANID NAME SALES LOCATIONID
tu

S1 ANITA SINGH ARORA 250000 102


S2 Y.P.SINGH 1300000 101
.s

S3 TINA JAISWAL 1400000 103


S4 GURDEEP SINGH 1250000 102
w

S5 SIMI FAIZAL 1450000 103


w

Table: LOCATION
LOCATIONID LOCATIONNAME
//w

101 Delhi
102 Mumbai
103 Kolkata
s:

104 Chennai
Write SQL queries for the following:
tp

i. To Display SalesmanID, names of salesman, LocationID with corresponding location


names. [2]
ht

ii.To display names of salesmen, sales and corresponding location names who have
achieved Sales more than 1300000. [2]
iii.To display names of those salesman who have 'SINGH' in their names. [2]
iv.Identify Primary key in the table SALES. Give reason for your choice. [1]
v.Write SQL command to change the LocationID to 104 of the salesman with Salesman
ID as S3 in the table 'SALES'. [1]

7. a) How does e-learning allow students to study at their own pace? [2]
b) How does e-governance empower citizens? write one point. [1]
c) Sabeena is creating a form for the hotel where she works. Help her to choose most

Downloaded from https:// www.studiestoday.com


Downloaded from https:// www.studiestoday.com

appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, Checkbox,


Label and Command Button for the following entries: [2]

S. No. Function
1 To input name
2 To allow enter gender out of M or F

om
3 To allow selecting type of room out of Deluxe,
SemiDeluxe, general
4 To allow entering preferences of guest in the

c
form of a paragraph

y.
*-*-*-*-*-*-*-*-*-*-*-*-*-*

da
to
es
di
tu
.s
w
w
//w
s:
tp
ht

Downloaded from https:// www.studiestoday.com

You might also like