TAGORE PUBLIC SCHOOL

SECOND PRE BOARD PRACTICE PAPER

Subject: INFORMATICS PRACTICES- Holiday Home Work

Class: XII Session 2017-18

Solve the following sample Paper, write answers on Sheets submit the same on 3 January 2018.
Q1 / 1 / Differentiate between OSS & Proprietary Software. After realizing the issues with proprietary software, Ms. Sunita has decided to use only Open Source Software. Suggest any one suitable open source software to her, for each of the following categories: i. Operating System
ii. Browser
2 / Expand terms: HTTP, TCP/IP, PPP. Also write use of them.
3 / Name Remote access software, also write use of it.
4 / Write basic concept of domain name, MAC (Media Access Control), and IP Address, domain name resolution
5 / Compare BUS topology with STAR topology. Mention any two main advantages of each.
6 / Explain Network Security Concepts: Cyber Law, Firewall, Cookies, Hackers and Crackers
7 / Explain Network security threats: Denial of service, Intrusion problems, Snooping, Eavesdropping
8 / Write use & expanded form of GSM, CDMA, WLL, 3G & 4G
Q2 / 1 / Write the value that will be assigned to variable x after executing the following Statement:
x = 7 *100+ 56/7 + 12*5;
2 / What values will be assigned to b, r and t after execution of the following code :
for(int i =25; i <= 23; i--) {
switch(i) {
case 25:
{
b=i;
break;
}
case 24:
{
r=i;
break;
}
default:{
t=i; }
}
}
3 / Rewrite the following code using switch case:
int day=Integer.parseInt(jTextField1.getText());
if(day>=1 & day<=5)
jOptionPane1.showMessageDialog(this, "Working Day");
else if(day>=6 & day<=7)
jOptionPane1.showMessageDialog(this, "Off Day");
else
jOptionPane1.showMessageDialog(this, "Invalid Entry");
4 / What will be the value of total after the loop finishes execution.
int total=10;
for(int count=15;count<=17;count++)
{
total += count;
}
jTextField1.setText("The Total is" + total);
5-A / Write the HTML tags & CODE that are required to be used to create the given HTML table for a Web page.
NAME / AGE / CONTACTNUMBER
NISHI / 21 / 9990622664
RAJAT / 24 / 9977622664
TAGORE / 18 / 9990633664
SOMESH / 25 / 9980622664
B
c / Write XML code to create the above table.How HTML is different from XML?
Ms. Sangeeta wants to add few descriptive lines in the HTML code which should not. Suggest her the solution along with example. be displayed on the webpage rather should remain inactive during execution.
Q3 / 1 / A)  Write Concept of Database transaction, Committing and revoking a transaction using COMMIT and
ROLLBACK AND SAVEPOINT.
B) Explain ALTER TABLE for
 Deleting column(s), modifying data type(s) of column(s),
 Adding a constraint, enabling constraint, dropping constraints.
 DROP Table for deleting a table or a database.
B) Write the following statement using ‘IN’ logical operator :
SELECT first_name, last_name, subject
FROM studentdetails
WHERE subject =‘Maths’ OR SUBJECT= ‘Science’;
C) Explain any 5 Single Row functions & 5 aggregate functions of MySQLwith an example
2 / Write output of the following MySQL statements:
SELECT YEAR(CURDATE()), DAYNAME(CURDATE());
SELECT TRUNCATE(345.206,2),ROUND(346.206,-2);
3 / I.  Define the term ‘database transaction’.
II.  Explain DISTINCT key word with an example.
III. Explain LIKE operator with an example.
IV. Chhavi has created a table named Orders, she has been asked to increase the value of a column named salesamount by 20. She has written the following query for the same.
Alter table Orders Add salesamount =salesamount+20;
Is it the correct query?If not write correct query & Justify your answer.
4 / 1.  Rashi wants to add another column ‘Hobbies’ with datatype and size as VARCHAR(50) in the already existing table ‘Student’. She has written the following statement. However it has errors. Rewrite the correct statement.
MODIFY TABLE Student Hobbies VARCHAR;
2.  Write SQL query to display employee details from table named ‘Employee’ whose ‘firstname’ ends with ‘n’ and firstname contains a total of 4 characters (including n).
Q4 / 1 / Write requirement and benefits of Front-End and Database Connectivity.
A class can have many methods with the same name as long as the number of parameters or type of parameters is different. This OOP concept is known as
a. Method Overriding b. Method Overloading c. Method Invocating d. Method Labeling
(Also write full form of OOPs)
2 / Write two property 7 Two Methods of jTextArea, jTextField, JPasswordField, JListBox, jComboBox & JButton
3 / What will be displayed in jTextField1 after the following code is executed?
int i, p, n;
n=5;
p=1;
if(n < 0)
jTextField1.setText(“Not Valid”);
else
{
for(i=1; i<=n; ++i)
{
p = p* i;
}
}
4 / 1)  Find the output of the following Java code snippet after execution of each java statement labeled as Stmt 1, Stmt 2, Stmt 3, Stmt 4:
String str1="RAVINDRANATH",str2="TAGORE";
jTextArea1.append((str1.substring(0,4))); //Stmt 1
jTextArea1.append((str2.substring(2))); //Stmt 2 jTextArea1.setText(jTextArea1.getText()+jTextArea1.getText().length()); //Stmt 3 jOptionPane1.showMessageDialog(null,jTextArea1.getText().length()); //Stmt 4
2) Rewrite the following code using do…while loop:
int num=Integer.parseInt(jTextField1.getText());
while(num<=40)
{
jOptionPane1.showMessageDialog(null,num);
num=num*40;
}
jOptionPane1.showMessageDialog(null,"Bye Bye");
5 / The following code has error(s). Rewrite the correct code underlining all the corrections made :
value1=1, value2=2;
while(value1<value2)
jTextArea1.append ("\n"+value1*value2;
value1++ }
6 / Mr. Pawan works as a programmer in “ABC Marketing Company” where he has designed a Salary generator software to generate the salary of salesman in which Name and Salary are entered by the user. A screenshot of the same is shown below:

Help him in writing the code to do the following: i. After selecting appropriate Radio Button, when ‘Commission’ button is clicked, commission should be displayed in the respective text field as each Salesman will get a commission based on the units sold according to the following criteria:

ii. When ‘Gross Salary’ button is clicked, Gross Salary should be calculated and displayed in the respective text field as per the given formula: Gross Salary= Salary+Commission
iii. After required selection of Checkbox(es), when ‘Facility Charges’ button is clicked, Facility charges will be displayed in the respective text field according to the following criteria:

iv. Money will be deducted from the Gross Salary according to the facilities opted by the employee. When ‘Net Salary’ button is clicked, Net Salary should be calculated and displayed in the respective text field as per the given formulae: Net Salary= Gross Salary-Deductions.
(ii) When ‘CLEAR’ button is clicked, all the textfields, radio buttons and checkboxes should be cleared.
(iii) When ‘Exit’ button is clicked, the application should get closed.
Q5 / 1 / Mrs. Sharma is the classteacher of Class ‘XII A’ She wants to create a table ‘Student’ to store details of her class.
i) Which of the following can be the attributes of Student table?
a) RollNo b) “Amit” c) Name d) 25
ii) Name the Primary key of the table ‘Student’. State reason for choosing it.
2 / Write the output of the following SQL queries:
i)  SELECT TRUNCATE(8.975,2); (2) 9
ii)  SELECT MID(‘HONESTY WINS’,3,4);
iii)  SELECT RIGHT(CONCAT(‘PRACTICES’,’INFORMATICS’),5);
iv)  SELECT DAYOFMONTH(‘2015-01-16’);
3 / Table “Emp” is shown below. Write commands in SQL for (i) to (iv) and output for (v) and (vi)

i. To display list of all employees below 25 years old.
ii. To list names and respective salaries in descending order of salary.
iii. To count the number of employees with names starting with ‘K’
iv. To list names and addresses of those persons who have ‘Delhi’ in their address.
v. SELECT Name, Salary FROM Emp where salary between 50000 and 70000;
vi. SELECT Name, phone from emp where phone like ‘99%’;
Q6 / 1 / Write SQL query to create a table ‘ITEMS’ with the following structure:
Field / Type / Constraint
I_Code / CHAR(4) / PRIMARY KEY
Name / VARCHAR(15) / NOT NULL
Category / VARCHAR(15)
Rate / INTEGER
2 / 1.  Identify Primary Key & Foreign Key from the following tables:
2.  Write Cartisan product of Watches & Sale.

3.  Write SQL commands & OUTPUT for the following :
a. To display Watch_Name, Price and Qty_Sold of all Watches whose Price is greater than 20000.
b. To display Watch_Name, Price, Quarter of those whose Qty_Sold is greater than 10.
c.  To display Average of Price grouped according to Type.
Q7 / 1 / Write Social, Environmental and Economic benefits or Impact of ICT on society.
List two main requirements that a company needs to put in place to offer an online shopping facility to customers.
2 / Write two examples where e-governance has reduced Paper work.
3 / Deeksha works for a school. She wishes to create Swing controls on a form for the following functions. Choose appropriate controls from Text field, Label, Radio button, Check box, List box, Combo box, Button and write in the third column.
Serial number / Control used to / Control
1 / Enter admission number
2 / Enter gender
3 / Enter subject
4 / Clear form
IP SET A5