Set-III

CLASS: XII

SUBJECT: INFORMATICS PRACTICES (065)

Time: 3.00 Hrs. Maximum Marks: 70

1 / (a) / Monika wants to upload and download files from/to a remote Internet server, write the name of the relevant communication protocol, which will let her do the same. / 1
(b) / (i)  Grijesh is confused about Wi-Fi. Whether it is aType of network cable
(ii)  Set of popular technologies and standards for wireless computer networking.
(iii)  Set of computer programs that help people log in to the Internet. / 1
(c) / Ravi is confused between the terms Domain Name and URL. Explain the difference with the help of appropriate examples of each. / 2
(d) / Write one advantage and one disadvantage of bus topology. / 2
(e) / Arrange the following communication channels in ascending order of their data transmission rate.
Ethernet cables, Optical fiber, Telephone cable, Co-axial cable. / 1
(f) / Which of the following softwares are Open Source: Linux, MS Windows7, Photoshop, MySql. / 1
(g) / Rahim is confused between Shareware and OSS. Mention at least two points of differences to understand the same. / 2
2 / (a) / Why Java is platform independent? / 1
(b) / What method would you use, in order to simulate a button’s (namely OkBtn) click event, without any mouse activity from user’s side? / 1
(c) / Write a function in java that takes cost price and selling price of a good as input and returns the profit made by the shopkeeper. / 2
(d) / How many times does the following loop execute? What is it type (Entry or Exit controlled loop)?
int x=2,y=20;
while (x<=y) {
JOptionPane.showMessageDialog(null,” “+x);
x=x+3;
} / 2
(e) / Face attribute is used with which HTML tag and what is its use? / 1
(f) / By which attributes the spacing in cells of table is controlled? / 1
(g) / Define XML. Is it Case-sensitive? Explain it’s utility. / 2
3 / (a) / Hari wants to list the names of all the tables in his database namely “Status”. What commands should he write at MySQL prompt to get this result? / 1
(b) / A table Sports1 in a database has 3 columns and 3 rows. Another similar table Sports2 has 3 columns and 5 rows. What is the degree and cardinality of Cartesian product‘s table? / 1
(c) / Differentiate between primary key and foreign key with a suitable example. / 2
(d) / Meena uses an EMP table with following columns: NAME, SAL, ID, DNAME
She needs to display names of employees who have not been assigned any department or have been assigned “Pathology” department. Pathology dept’s names end with “Pathology”. She wrote the following query:
SELECT NAME, SAL
FROM EMP
WHERE DNAME = NULL AND DNAME = “Pathology%”;
But the query is not producing result. Identify the problem. / 2
(e) / What will be the output of following queries on the basis of employee table:
empid / ename / salary
A1 / Bob / NULL
B1 / John / 4000
B2 / Tom / 5000
(i)  select avg(salary) from employee;
(ii)  select count(salary) from employee; / 2
(f) / Significance of SavePoint and RollBackTo in MYSQL database. / 2
4 / (a) / What will be the contents of jTextField1 and jTextField2 after executing the following code:
String name1= “Hello World”;
name1= name1.toLowerCase( );
int s= name1.length( );
jTextField1.setText(name1);
jTextField2.setText(“”+s); / 2
(b) / Rewrite the following program code using for loop:
Int num=6;
int temp=num;
while(num>=1)
{ temp=temp-1;
if (temp%2==0)
System.out.println(“Is even”);
else
System.out.println(“Is odd”);
num=num-2;
} / 2
(c) / What will be the contents of jTextArea1 after executing following statement:
jTextArea1.setText("Pure\nObject\nOriented\tProgramming"); / 1
(d) / What will be the value of x and y after execution of the following code?
int x, y=0;
for(x=1;x<=5;++x)
y=x++;
--y; / 2
(e) / Identify the output in the following code where num1TF contains “12” and num2TF contains “34”.
int value= Integer.parseInt(num1TF.getText( ) + num2TF.getText( ));
JOptionPane.showMessageDialog(null,” “ + (value+1)); / 1
(f) / Rewrite the correct code underlining all the corrections made: Int i; j=5;
i== j+5;
if(i=j)
{ jTextField1.setText(“i and j are unequal”);
jTextField2.setText(“they are not equal”); break;
}
else
jTextField1.setText(“i and j are equal”); / 2
(g) / Oberoi of hotels has computerized it booking system. The following is the Booking From along with details: ( you may assume default names in sequence or suitable name for controls).

i)  Write the code for exit button so that when a user clicks on exit button Application will be closed. Also display a message “Thank you for your nice visit” before exiting the application. [2]
ii)  When the command button Calculate Charges is clicked all the charges along with discount & Total computed and displayed. [3]
Then criterion for the calculation of charges is given below:
Total = (Room charges + fooding charges - discount)
Single Room:- Rs.400 per day Double Room :- Rs.700 per day
Breakfast:- Rs.100 per day Lunch: Rs.180 per day Dinner: Rs.200 per DayGold card member will be given 20% discount on total charges. / 5
5 / (a) / Sita needs to remove all the rows in the Sales table to release the storage space without to remove the table structure. Write the statement that she should use? / 1
(b) / Mohit is not clear about the difference between the following two statements:
(i)  select (9-6) *12;
(ii)  select (9-6) *12 from EMP;
Help him to understand the difference between these two statements if emp table having four rows. / 2
(c) / Consider the table Hospital given below. Write commands in MySQL for (i) to (iv) and output for (v) to (vii).
No / Name / Age / Department / DateOfAdm / Charges / Sex
1 / Sandeep / 64 / Surgery / 23/02/97 / 400 / F
2 / Ravina / 24 / Orthopedic / 20/01/98 / 200 / F
3 / Karan / 45 / Orthopedic / 10/02/97 / 200 / M
4 / Tarun / 12 / Surgery / 01/01/98 / 300 / F
5 / Zubin / 36 / ENT / 12/01/98 / 250 / M
6 / Ketaki / 16 / ENT / 12/02/98 / 300 / F
7 / Ankita / 29 / Cardiology / 20/02/98 / 800 / F
8 / Zareen / 45 / Gynecology / 22/02/98 / 400 / F
9 / Kush / 19 / Cardiology / 13/01/97 / 800 / M
10 / Shailya / 31 / Medicine / 19/02/97 / 400 / F
(i)  To show all information of patients who are in Orthopedic department from hospital table in descending order of their age.
(ii)  Increase the charges of male patient in ENT department by 4%.
(iii)  Display a report listing name, age, charges and amount of charges including VAT as 2% on charges, name the column as total charges.
(iv)  To count the number of patients with Age < 30.
(v)  SELECT AVG(Charges) FROM HOSPITAL WHERE SEX=’F’;
(vi)  SELECT COUNT(DISTINCT Department) FROM HOSPITAL;
(vii)  SELECT NAME FROM HOSPITAL WHERE NAME LIKE “_u%” ; / 7
6 / (a) / Write an MySQL query to create the table ‘Menu’ with the following structure:
Field / Type / Constraint
ItemCode / Varchar(5) / Primary Key
ItemName / Varchar(20) / Not null
Category / Varchar(20) / Default ‘Chinese’
Price / Decimal(5,2) / >100
/ 2
(b) / Consider the tables PEOPLE and PROPERTIES given below:
PEOPLE
Name / Phone / PID
Aisha / 9411223344 / 1
Karan / 9422114455 / 2
Rosy / 9433112244 / 3
PROPERTIES
PID / SPID / Farm_Name
1 / 1 / Old house farm
3 / 2 / Nanada’s farm
2 / 3 / Will’s farm
3 / 4 / Tall farm
4 / 5 / The florist
With reference to these tables, write command in SQL for (i) and (ii) output for (iii).
(i)  Display the name and PID of each person who has a farm.
(ii)  Display the farm_name of farm(s) owned by Karan.
(iii)  SELECT Name, Phone, Farm_Name
FROM PEOPLE join PROPERTIES
On PEOPLE.PID = PROPERTIES .PID;
(iv)  Which column in the ‘PROPERTIES’ table is the foreign key?
(v)  How many rows will be there in non equi- join of these two tables? / 2
2
2
1
1
7 / (a) / What is the impact of e-learning sites on students learning process? / 1
(b) / Name any two web portals involved in e-Business. / 1
(c) / How has today’s technology contributed to e-governance? / 1
(d) / Vivek works for the school. He wishes to create controls on a form for the following functions. Choose appropriate controls from Text Field, Text Area, Label, Option Button, Check Box, List Box, Combo Box, RadioButton.
S.No / Control used to / Control
1 / Enter Admission No
2 / Enter Gender
3 / Choose subjects from list of subjects
4 / Clear the form
/ 2

Set-III

CLASS: XII

Marking Scheme- INFORMATICS PRACTICES (065)

Q.1 / (a) / FTP, HTTP ( ½ Marks for each correct answers) / 1 mark
(b) / Radio Wave, Micro Wave ( ½ mark for each) / 1 mark
(c) / 1 mark for correct deference and 1 mark for suitable example. / 2 marks
(d) / 1 for advantage & 1 for disadvantage / 2 marks
(e) / Telephone Cable, Ethernet Cable, Co-axial cable, Optical Fiber / 1 mark
(f) / Linux, MySql / 1 mark
(g) / 1 mark for each correct difference. / 2 marks
Q.2 / (a) / 1 mark for correct explanation with use of Byte code. / 1 mark
(b) / .doClick() / 1 mark
(c) / private float calProfit( float cp, float sp)
{ float pr= sp-cp;
Return (pr); }
[1 mark for proper prototype and 1 mark for method body] / 2 marks
(d) / 8 times, Entry controlled loop.
[1 marks for loop count & 1 mark for loop type] / 2 marks
(e) / Font tag, used to set the font face/type
[ ½ mark for Tag & ½ for purpose] / 1 mark
(f) / CELLSPACING of Table tag. (1 mark for correct answer) / 1 mark
(g) / XML-Extensible Markup Language
Yes, it’s Case-sensitive & it’s utility is dynamic tags creation as per demand at compile-time by the user. / ½ +½ + 1
Q.3 / (a) / Show Tables; ( 1 mark for correct answer) / 1 mark
(b) / The Cartesian table’s Degree= 6 and Cardinality =15 ( ½ for each) / 1 mark
(c) / 1 marks for correct difference and 1 mark for example. / 2 marks
(d) / Select name, sal from EMP
where DnameISNULL and dname=”%Pathology”
(1 mark for each correction) / 2 marks
(e) / (i) 4500 (ii) 2 (1 mark for each) / 2 marks
(f) / SavePoint & RollBackTo Commands significance in Context of MYSql. / 1+1 marks
Q.4 / (a) / hello world
11 (1 mark for each correct output) / 2 marks
(b) / int temp=num;
for(num=6; num>=1; num=num-2)
{ temp=temp-1;
if (temp%2==0)
System.out.println(“Is even”);
else
System.out.println(“Is odd”);
}
(1 mark for use of for loop & 1 mark for placement of condition and counter) / 2 marks
(c) / Pure
Object
Oriented Programming / 1 mark
(d) / x= 7 and y=4 / 2 marks
(e) / 1235 / 1 mark
(f) / Inti ,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”)
( ½ for each correction) / 2 marks
(g) / (i) // to do code for Exit button
JOptionPane.showMessageDialog(null,"Thank you for your nice visit");
System.exit(0);
(1 mark for each command)
(ii) //to do code for Calculate Charges Button
float day,rmchg, fchg, disc,tamt;
day =Integer.parseInt(jTextField2.getText());
if (jRadioButton1.isSelected())
rmchg=day*400;
else
rmchg=day*700;
// calculate food charges for all combination of check boxes
if(jCheckBox1.isSelected() & jCheckBox2.isSelected() & jCheckBox3.isSelected())
fchg=day*(100+180+200);
if(jCheckBox1.isSelected() & jCheckBox2.isSelected() & ! jCheckBox3.isSelected())
fchg=day*(100+180);
if(jCheckBox1.isSelected() & ! jCheckBox2.isSelected() & jCheckBox3.isSelected())
fchg=day*(100+200);
if(jCheckBox1.isSelected() & ! jCheckBox2.isSelected() & ! jCheckBox3.isSelected())
fchg=day*100;
if(! jCheckBox1.isSelected() & jCheckBox2.isSelected() & jCheckBox3.isSelected())
fchg=day*(180+200);
if(! jCheckBox1.isSelected() & jCheckBox2.isSelected() & ! jCheckBox3.isSelected())
fchg=day*180);
if(! jCheckBox1.isSelected() & ! jCheckBox2.isSelected() & jCheckBox3.isSelected())
fchg=day*200;
if(! jCheckBox1.isSelected() & ! jCheckBox2.isSelected() & ! jCheckBox3.isSelected())
fchg=0;
tamt=rchg+fchg;
if (jCheckBox4.isSelected())
dis=tamt*20/100;
else
dis=0;
tamt=tamt-dis;
jTextField3.setText(“”+rchg);
jTextField4.setText(“”+fchg);
jTextField5.setText(“”+dis);
jTextField6.setText(“”+tamt);
( 1 mark for variable declaration, 1 mark for check box condition and 1 mark for calculation and display) / 2+3 marks
Q.5 / (a) / Delete from Sales; / 1 mark
(b) / (i) 36 (ii) 36 (1 mark for each correct answer) / 1 mark
(c) / (i) select * from Hospital where Department=’Orthopedic’
order by Age;
(ii) Update Hospital set charges= charges +(charges*4/100)
Where Department=’ENT’;
(iii) select name, age, charges, charges+(charges*2/100) as ‘Total Charges’ from Hospital;
(iv) select count (*) where age<30;
(v) 400
(vi) 6
(vii) Zubib
Kush / 7 mark
(1 mark for each)
Q.6 / (a) / Create table Menu (ItemCodevarchar(5) Not Null Primary Key,
ItemNamevarchar(20) Not Null,
Category varchar(20) default ‘Chinese’,
Price decimal(5,2) check price>100);
(1 mark for create command with column name & data type and 1 mark for constraints) / 2 marks
(b) / (i) select name, PID from People
where PID in (select PID from Properties)