Informatics Practices 2011 CBSE [ Delhi] Set I
To Access the full content, Please Purchase
-
Q1
a) What is the impact of e-learning sites on students learning process?
b) Write two advantages of e-Business sites.
c) Write three important features of e- Governance? Give URL of one of the commonly used e-Governance portal.
d) Jaina is creating a form for her practical file. Help her to choose most appropriate controls from List Box, Combo Box, TextField, TextArea, Radio Button, Check box, Label and Command button for the following entries from user:i) A message “Enter Name” in front of a Text Field.
ii) An input to choose more than one subjects from a set of given choices.
iii) An input for entering comments of user.
iv) An input for accepting the residential area out of Rural and Urban as options. [1+1+2+2 = 6]Marks:6Answer:
a) The e-learning sites give students the opportunity to improve themselves in the following areas:
• Class work can be scheduled around personal and professional work.
• Reduces travel cost and time to and from school.
• Self-paced learning modules allow learners to work at their own pace.
• Flexibility to join discussions in the bulletin board threaded discussion areas at any hour or visit with classmates and instructors remotely in chat rooms.
• Development of computer and Internet skills that is transferable to other facets of learner's lives.b) The two advantages of e-business sites are:
• Reduction in transaction and other costs.
• Access to international market.c) The three important features of e-Governance are:
i) E-Administration: It improves government processes by cutting costs, by managing performance, by making strategic connections within government and by creating empowerment.
ii) E-Citizens and E-Services: It connects citizens to government by talking to citizens and supporting accountability, by listening to citizens and supporting democracy and by improving public services.
iii) E-Society: It helps in building interactions beyond the boundaries of government by working better with business, by developing communities, by building government partnerships and by building civil society.
The URLs of the commonly used e-Governance portal are:
(i) Passport.gov.in
(ii) Mca.gov.ind)
i) TextField
ii) List box
iii) Label
iv) Radio button -
Q2
[2+1+2+2+1+1=9]Marks:9Answer:
a) CREATE TABLE PAYMENT
(Loan_Number Int(4) Primary Key,
Payment_number Varchar(3),
Payment_date Date,
Payment_Amount Int(8) Not Null);
b) (i) SELECT * FROM PRODUCT WHERE Price BETWEEN 40 AND 120;
(ii) SELECT A.ClientName, A.City, B.ProductName, B.Price FROM Client A, PRODUCT B WHERE A.P_ID = B.P_ID;
(iii) UPDATE Product SET Price= Price*20;
(c) (i) The foreign key in the Member Table is the Divno as it is the Primary Key for the Division Table. A foreign key refers to a primary key or a unique key in another table.
(ii) An equi-join is a join based on equality or matching column values. So, the output here will be:
Name
Shankhya
Sunish
-
Q3
a) Write MySql command that will be used to open an already existing database “LIBRARY”.
b) The Mname Column of a table Members is given below:Mname
Aakash
Hirav
Vinayak
Sheetal
Rajeev
Based on the information, find the output of the following queries:
i) Select Mname from members where mname like “%v”;
ii) Select Mname from members where mname like “%e%”;
c)A table “TRAINS” in a database has degree 3 and cardinality 8. What is the number of rows and columns in it?
d) Differentiate between Alternate Key and Candidate Key.
e) Define data encapsulation with reference to Object Oriented Programming.
f)A worker_Id consisting of 4 digits is stored in a string variable strWrkld. Now Mr. Jai wants to store this Id in integer type of variable IntWrkld. Write a Java statement to do this.
g) Sarthya, a student of class XI, created a table “RESULT”. Grade is one of the column of this table. To find the details of students whose Grades have not been entered, he wrote the following MySql query, which did not give the desired result.
SELECT * FROM Result WHERE Grade =”Null”;
Help Sarthya to run the query by removing the error from the query and write the correct Query.
[1+2+2+1+1+1+2=10]
Marks:10Answer:
a) SHOW LIBRARY;
b) i) Hirav, Rajeevii) Sheetal, Rajeev
c) rows=3columns=8
d)
Alternate Key
Candidate Key
An alternate key is any candidate key that is not choosen to be the primary key.
A candidate key is one that can identify each row of a table uniquely.
It is a field or combination of fields that acts as a primary key field for that table to uniquely identify each record in that table.
e) Encapsulation is a way of organizing data and methods into a structure by concealing the way an object is implemented, i.e., preventing access to data by any means other than those specified. Encapsulation therefore guarantees the integrity of the data contained in the object.
(f) String strWrkld = "1000";Integer IntWrkld = Integer.valueOf(strWrkld);
System.out.println(IntWrkld)
(g) SELECT * FROM RESULT WHERE GRADE IS NULL; -
Q4
(a) What is the purpose of DROP TABLE command in MYSQL? How is it different from DELETE command?
(b) Table Employee has 4 records and Table Dept has 3 records in it. Mr. Jain wants to display all information stored in both of these related tables. He forgot to specify equi-join condition in the query. How many rows will get displayed on execution of this query?
(c) Consider the table RESULT given below. Write commands in MySql for (i) to (iv) and output for (v) to (vii)Table : Result
No
Name
Stipend
Subject
Average
Division
1
Sharon
400
English
38
THIRD
2
Amal
680
Mathematics
72
FIRST
3
Vedant
500
Accounts
67
FIRST
4
Shakeer
200
Informatics
55
SECOND
5
Anandha
400
History
85
FIRST
6
Upasna
550
Geography
45
THIRD
(i)To list the names of those students, who have obtained Division as First in the ascending order of Name.
(ii)To display a report listing NAME, SUBJECT and Annual stipend received assuming that the stipend column has monthly stipend.
(iii)To count the number of students, who have either Accounts or Informatics as Subject.
(iv)To insert a new row in the table EXAM:
6, “Mohan”, 500, “English”, 73, “Second”
(v) SELECT AVG( Stipend) FROM EXAM WHERE DIVISION=”THIRD”;
(vi) SELECT COUNT(DISTINCT Subject) FROM EXAM;
(vii) SELECT MIN(Average) FROM EXAM WHERE Subject=”English”;
[2+1+1+1+1+1+1+1+1=10]Marks:10Answer:
Note: [Result Table is considered as Exam Table]
a) The DROP TABLE command purpose is to remove the table and all its data from the database entirely. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.
The DELETE command is used to remove some or all rows from a table.b) All records will be displayed here. The 4 records from the Employee Table and 3 records from the Dept Table i.e.,4 + 3 = 7 records.
c) (i)
SELECT Name from Result WHERE Division =”FIRST”
ORDER BY Name;(ii) SELECT Name, Subject, Stipend*12 from Result;
(iii) SELECT COUNT(*) FROM Result WHERE (Subject=‘Accounts’ OR SUBJECT = ‘Informatics’);
(iv)
INSERT INTO Exam VALUES(6,’Mohan’,500,’English’,73,’Second’);
(v) 400+550/2
= 950/2
=475
(vi) 6. The DISTINCT clause does not contain the duplicate rows in the output.
(vii) 38 -
Q5
(a) Ms. Taufiq Ahmed wants to prevent unauthorized access to/from his company’s local area network. Write the name of a system (hardware/software), which he should install to do the same.
(b) Beauty Lines Fashion Inc. is a fashion company with design unit and market unit 135 meters away from each other. The company recently connected their LANs using Ethernet cable to share the stock related information. But, after joining their LANs, they are not able to share the information. But, after joining their LANs, they are not able to share the information due to loss of signal in between. Which device out of the following should you suggest to be installed for a smooth communication?
i) UPSii) Modem
iii) Repeater(c) Which of the following is not a feature of Networking?
1) Resource sharing
2) Uninterrupted power supply
3) Reduced cost
4) Reliability
(d) Name any two Indian scripts included in Unicode.
(e) Mr. Jayanto Das is confused between Shareware and Open source software. Mention at least two points of differences to help her understand the same.
(f) Identify the type of Topology from the following:
i) If each node is connected with the help of independent cable with the help of a central switching (communication controller).
ii) If each node is connected with the help of a single-coaxial cable.
(g) Define the following with reference to Threats to Network Security.
i) Trojan Horse
ii) Worm [1+1+1+1+2+2+2=10]Marks:10Answer:
a) Firewall - A firewall is a device that guards the entrance to a private network and keeps out unauthorised or unwanted traffic.
b) Repeater - A repeater is a device that receives a digital signal on an electromagnetic or optical transmission medium and regenerates the signal along the next leg of the medium.
c) UPS - Uninterrupted Power Supply
d) Two Indian scripts included in Unicode are
i)Devanagari ii)Gurumukhie)
Shareware
Open source software
1. Software available for free trial
1.Software that is available in source code form for which the source code and certain other rights normally reserved for copyright holders are provided under a software license that permits users to study, change, improve and at times also to distribute the software.
2. Small payment to get registered.
2.Source code is freely available
f)i) Star Topology
ii) Bus Topology
g)
i) Trojan Horse - Trojan horse is a program in which malicious or harmful code is contained inside, apparently harmless programming or data in such a way that it can get control and do its chosen form of damage, such as ruining the file allocation table on your hard disk.
ii) Worm - A worm is a self-replicating virus that does not alter files but resides in active memory and duplicates itself. Worms use parts of an operating system that are automatic and usually invisible to the user. -
Q6
(a) While working in Netbeans, Ms Kanta Surbhi wants to display ‘Cleared’ or ’Re-attempt required’ message depending the marks entered in jTextField. Help her to choose more appropriate statement out of ‘If statement’ and ‘Switch statement’.
b) Write a statement to make jTextArea1 as an un-editable.c) Which HTML tags are used for making a table and adding rows in a HTML document?
d) How is < UL > tag different from < OL > tag of HTML?
e) What will be the value of A and B after execution of the following code:
int A=100,B;
for(B=10;B<=12;B++)
{
A+=B;
}
JOptionPane.showMessageDialog(this,”A: “+A+” B: “+B+””);
f) Differentiate between HTML and XML.
g) Write Java code that takes the price of a pencil from jTextField1 and quantity of pencils from jTextField2 and calculates total amount as price*quantity to be displayed in jTextField3 and also find 10% tax amount to be displayed in jTextField4. [1+1+1+1+2+2+2=10]
Marks:10Answer:
a) ’if statement‘ is appropriate to display message as there are two conditions to check, i.e. ‘Cleared’ or ‘Re-attempt’.
‘Switch statement’ is used in several choices. It controls the flow of program execution via a multiway branch.
(b) TextArea1 = new JTextArea1(5, 20);
TextArea1.setEditable(false);
(c) < table >
< tr >
< td > < /td >
< /tr >
< /table >
(d) An < UL > (unordered List) is a list of items which may appear in any particular order, displayed as a bulleted list of items.
An < OL > (ordered List) is a list of items which is appeared in a particular order, i.e., to put numbering in front of the items.
(e)
When B=10
A=A+B
=100+10=110
Next B=11
A=A+B=110+11=121
Next B=12 condition false
Result: A:121 B:12
(f)
HTML
XML
1.HyperText Markup language
1.eXtensible Markup Language
2.Designed to display data
2.Designed to carry data
3.Closing Tag not mandatory.
3. Closing Tag is mandatory.
4.Tags are predefined.
4.Tags are not predefined.
(g) String price=jTextField1.getText();
String pencils=jTextField2.getText();
int Total_Amount=Integer.parseInt(price)*pencils;
float Tax=(10*Total_Amount)/100
jTextField3.setText(price);
jTextField4.setText(Tax);
-
Q7
(a) What will be displayed into jTextField1 after executing the following code:
int N=20;N=N+1;
if(N<21)jTextField1.setText(Integer.toString(N+10)); else
jTextField1.setText(Integer.toString(N+15));
b) Rewrite the following program code using a Switch statement.
if(code==1)
Day=”Monday”;
else if(code==2)
Day=”Tuesday”;
else if(code==3)
Day=”Wednesday”;
else if(code==4)
Day=”Thursday”;
else
Day=”No Match”;
c) What will be displayed in jTextArea1 after executing the following statement:
jTextArea1.setText(“Live\nIn Peace\t and harmony”);
d) The following code has some error(s).Rewrite the code underlining all the corrections made:
Int P=3;sum=0; //Declaring P and sum as Integer
{
sum=P;
P+=3;
}
while(P=<12)
jTextField1(Integer.tostring(sum));
e) Given a string object namely ‘VALUE’, having value as “324” stored in it .What will be the result of the following:
JOptionPane.showMessageDialog(null,” ”+(Value.length()+Integer.parseInt(value)));
f) The following code has some error(s). Rewrite the correct code underlining all the corrections made;
int Total=0,Jump=5;
int I;
for(i=0,I=<5;i++)
{
Jump+=5,
Total+=Jump;
}
jTextArea1.showText(“ ”+Total);
g) Mr. Ram Kishore, the owner of the kiddi Land Enterprises has asked his programmer Saumya to develop the following GUI in Netbeans.
Mr.Ram accepts payment through three types of credit cards. The offer is given according to the following scheme:Type of Card
Offer
Platinum
20% of amount
Gold
15% of amount
Silver
10% of amount
If the Bill amount is more than Rs. 25,000/- then the customer gets an additional offer of 5%.
Write Java code for the following:
a) To assign Additional Offer as 0(jTextField4) and Net amount as 0(jTextField5). Also set them as un-editable.
b) [when “Calculate Offer” (jButton1) is clicked]
To calculate discount as per the given criteria and display the same in jTextField3
To assign Additional offer (jTextField4) as 5% of amount (jTextField2) as per the above condition.
To enable “Calculate Net amount” (jButton2) button.
c) [When “Calculate Net Amount” (jButton2) button is clicked]
To calculate net amount as [TotalCost(jTextField2)-offer(jTextField3)]–Additional offer(jTextField4)]To display the net amount in jTextField5.
[2+2+1+2+1+2+1+2+2=15]Marks:15Answer:
a) Since N=21 condition is false,
so, result is N+15=21+15=36
jTextField1 value is 36
b)
int code;
switch(code)
{
case 1:
Day=”Monday”;
break;
case 2:
Day=”Tuesday”;
break;
case 3:
Day=”Wednesdy”;
break;
case 4:
Day=”Thursday”;
break;
default:
Day=”No Match”;
}
c)
Live
In Peace and harmony
d) int P=3;sum=0;
do //do missing
{
sum=P;
P+=3;
}
while(P>12)
jtextField1(Integer.toString(sum))) // string
}
e) 327
f) int Total =0,Jump=5;
int I;
for(I=0;I=<;I++)
{
Jump +=5,
Total+=Jump;
}
jTextArea1.showText(“ ”+Total);
g) (a) Right click on form Kiddi Land.
Select Events -> Window Focus -> wind GainedFocused.
Write the following line—
jTextField4.setText(0);
jtextField4.setEditable(false);
jTextField5.setText(0);
jtextField5.setEditable(false);
(b) Double click on the Calculate Offer.
The jButton1ActionPerformed event handler appears with a // TODO add your handling code here:
float Additionaloffer,offer;
float a=float.parsefloat(jTExtField2.getText())
if(jRadioButton1.isSelected() && a>25000)
{
offer=a*20/100;
Additionaloffer=(a-offer)*5/100;
}
else
if(jRadioButton2.isSelected() && a>25000)
{
offer=a*15/100;
Additionaloffer=(a-offer)*5/100;
}
else
if(jRadioButton3.isSelected() && a>25000)
{
offer=a*10/100;
Additionaloffer=(a-offer)*5/100;
}
jTextField3.setText(“offer”);
jTextField4.setText(“Additional-offer”)
To assign Additional offer (jTextField4) as 5% of amount( jTextField2) as per the above condition.
To enable “Calculate Net Amount” (jButton2) button
(c) Double click on the Calculate Net Amount. The jButton2ActionPerformed event handler appears with a
// TODO add your handling code here:
Float net-amt;
float a=float.parsefloat(jTextField2.getText());
float offer=float.parsefloat(jTextField3.getText());
float addoffer=float.parsefloat(jTextField4.getText());
net-amt=a-offer-addaffer;
jTextField5.setText(“net-amt”);