6343imp ip paper
6343imp ip paper
Types of Questions Marks Per Question Total Number of Questions Total Marks
SA I 1 16 16
SA II 2 18 36
LA 6 3 18
Total 37 70
1 (a) Tara Nathani wants to upload and download files from/to a remote intenet server, write the
name of the relevant communication protocol, which will let her do the same.
Ans. File Transfer Protocol (FTP) (1 Mark for Abbreviation and/or Full Form)
(b) Two doctors in the same room have connected their Palm Tops using Bluetooth for working
on a Group presentation. Out of the following, what kind of Network they have formed?
LAN, MAN, PAN, WAN
Ans. Personal Area Network (PAN) (1 Mark for correct answer)
(c) Arrange the following communication channels in ascending order of their data
transmission rates.
Ethernet Cable, Optical Fiber, Telephone Cable, Co-axial Cable
Ans. Telephone Cable, Ethernet Cable, Co-axial Cable, Optical Fiber
(1 Mark for correct answer)
(d) Which of the following is not a characteristic of Open Source Software?
Its source code is available for modification
It is owned by a company or an individual
It can be downloaded from internet
Ans. It is owned by a company or an individual (1 Mark for correct answer)
(e) Jai Khanna is confused between the terms Domain Name and URL. Explain the difference
with the help of appropriate examples of each.
Ans. An easier way of remembering a website is by its Uniform Resource Locator (URL), which is a
simple string of characters used to represent and identify a Web page or website. Unlike the
IP address, the URL consists of text, which makes it easier to remember. An example of a
URL is, http://www.google.com. In this URL, www.google.com is the domain name. A
domain name consists of the following three parts:
www
Name of the website
Top Level Domain (TLD), such as .com, .net, .org, .edu, and .in
(2 marks for correct explanation of difference with the help of example)
(f) Define any two threats to Network Security.
Ans. The two threats to Network Security are as follows:
x Worms: Refer to malicious programs that can copy themselves and use networks to
send copies of themselves to other computers. A worm causes harm by consuming the
entire disk space or memory of your computer through self-replication.
x Snooping: Refers to the act gaining unauthorized access to a user’s files and other
personal information, such as password and login details, without the knowledge or
permission of the user. This includes monitoring the activity of the user on a network
by using snooping software.
(1 mark each for correctly defining any two threats)
Sample Question Paper: I 3
x Bus Topology: The bus topology has a single transmission medium with which
several nodes are connected. In this topology, a host located at one end of the bus (or
the central node) communicates with all the other nodes attached along its length. In
the bus topology, data transmission can take place from any workstation (or node).
However, data travels along the length of the bus in both directions, and is received
by all workstations. Terminators present at both ends of the bus help to absorb the
signal, removing it from the bus. Figure B shows the arrangement of devices in the
bus topology:
Allows users to define their own tags Allows users to use only predefined tags
Requires the user to close each tag Does not require the user to close each tag
(d) Rama is not able to change a value in a column to NULL. What constraint did she specify
when she created the table?
Ans. Rama specified 'NOT NULL' constraint for that column when she created the table.
(1 mark for correct answer)
(e) Distinguish between a Primary key and Candidate key with the help of suitable example of
each.
Ans. Candidate key is a column or a group of columns that can be a primary Key of a table. A
table can have multiple candidate keys but it can have only one primary key. For example, A
table CUSTOMER contains the columns CustomerId, AccountNo, Name, Address, PhoneNo,
and Balance. In this table CustomerId and AccountNo (both are unique for every row in the
table) are candidate keys. Out of these any one can be chosen as the primary key of the
table.
(1 mark for correct answer 1 mark for suitable example)
(f) The LastName column of a table "Directory" is given below:
LastName
Batra
Sehgal
Bhatia
Sharma
Mehta
Based on this information, find the output of the following queries:
a. SELECT LastName FROM Directory WHERE lastname like "_a%";
b. SELECT LastName FROM Directory WHERE lastname not like "%a";
Ans. a. Last Name
Batra
b. Last Name
Sehgal
(g) A table "Stock" in a database has 5 columns and contains 17 records. What is the degree
and cardinality of this table?
Ans. Degree = 5. Cardinality = 17 (1 mark for each part)
4 (a) Define a class with reference to object oriented programming.
Ans. A class is an abstract user-defined data type that is used as a blueprint to define the
objects of that class. ( 1 mark for correct definition)
(b) What will be the content of jTextField1 after executing the following code:
int Num = 6;
Num = Num + 1;
if ( Num > 5)
jTextField1.setText(Integer.toString(Num));
else
jTextField1.setText(Integer.toString(Num+5));
Ans. 7 ( 1 mark for correct answer)
(c) What will be the contents of jTextArea1 after executing the following statement:
jTextArea1.setText("Object\nOriented\tProgramming");
6 Sample Question Paper: I
Ans. jTextArea1 will display the following text:
Object Oriented Programming
‘\n’ is used to break the string to the next line; however, ‘\t’ is used to provide a tab spacing
between two strings.
(1 mark for contents to be printed)
( ½ mark each for writing the effect of '\n' and ' \t')
(d) Rewrite the following program code using switch statement:
if (d == 1)
day = "Monday";
else if (d == 2)
day = "Tuesday";
else if (d == 3)
day = "Wednesday";
else
day = "-";
Ans. switch(d)
{ case 1:
day = "Monday";
break;
case 2:
day = "Tuesday";
break;
case 3:
day = "Wednesday";
break;
default:
day = "-";}
(2 marks for correct answer)
(e) The following code has some error(s). Rewrite the correct code underlining all the
corrections made:
int i=2; j=5;
while j>i
{jTextField1.getText("j is greater");
j--;++i;}
JOptionPane.showMessageDialog("Hello");
Ans. int i=2, j=5;
while (j>i)
{ jTextField1.setText("j is greater");
j--;
++i;
}
JOptionPane.showMessageDialog(this, "Hello");
( ½ mark each for identifying and correcting 4 errors)
(f) What will be the contents of jTextField1 and jTextField2 after executing the following code:
String s = "ABC Micro Systems";
jTextField1.setText(s.length()+" ");
jTextField2.setText(s.toLowerCase());
Ans. jTextField1: 17
jTextField2: abc micro systems
(1 Mark for 17
1 Mark for abc micro systems)
Sample Question Paper: I 7
(g) Glamour Garments has developed a GUI application for their company as shown below:
The company accepts payments in 3 modes- cheque, cash and credit cards. The discount
given as per mode of payment is as follows.
Mode of Payment Discount
Cash 8%
Cheque 7%
Credit Card Nil
If the Bill Amount is more than 15000 then the customer gets an additional discount of 10%
on Bill Amount.
(i) Write the code to make the textfields for Discount (named txtDisc) and Net Amount
(named txtNetAmt) uneditable.
(ii) Write code to do the following:
(a) When "Calculate Discount" button is clicked the discount should be calculated as
per the given criteria and it should be displayed in the discount textfield.
"Calculate Net Amount" button (named btnCalcNetAmt) should also be enabled.
(b) When "Calculate Net Amount" button is clicked the net amount should be
calculated and it should be displayed in the net amount textfield.
Ans. (i) txtDisc.setEditable(false);
txtNetAmt.setEditable(false);
(1 mark each for both parts)
8 Sample Question Paper: I
(ii) (a) float BillAmt, NetAmt, Disc;
String ModeofPayment;
BillAmt = Float.parseFloat(txtBillAmt.getText());
ModeofPayment = (String) cmbMode.getSelectedItem();
if (ModeofPayment.equals("Cash"))
Disc = BillAmt*8/100;
else if (ModeofPayment.equals("Cheque"))
Disc = BillAmt*7/100;
else Disc = 0;
if (BillAmt > 15000)
Disc = Disc + BillAmt*10/100;
btnCalcNetAmt.setEnabled(true);
txtDisc.setText(Disc+"");
( ½ Mark for variable declaration with appropriate data types)
( ½ Mark for extracting Bill Amount correctly from the text box)
( ½ Mark for extracting Mode of Payment correctly from Combo Box)
( ½ Mark for calculating correct Discount based on Mode of Payment)
( ½ Mark for calculating Discount based on Bill Amount and displaying it)
( ½ Mark for Enabling btnCalNetAmt)
(b) float BillAmt, NetAmt, Disc;
BillAmt = Float.parseFloat(txtBillAmt.getText());
Disc = Float.parseFloat(txtDisc.getText());
NetAmt = BillAmt - Disc;
txtNetAmt.setText(NetAmt+"");
( ½ Mark for calculating Net Amount)
( ½ Mark for Displaying Net Amount)
5 (a) Explain the purpose of DDL and DML commands used in SQL. Also give two examples of
each.
Ans. x Data Definition Language (DDL): DDL commands are used to create, destroy, and
to restructure the database objects.
Example: CREATE and ALTER
x Data Manipulation Language (DML): DML commands are used to insert, delete
and change data in tables.
Example: SELECT and DELETE
(½ Mark each for purpose and examples of DDL)
(½ Mark each for purpose and examples of DML)
(b) Write the output of the following SQL queries:
a. SELECT ROUND(6.5675, 2);
b. SELECT TRUNCATE(5.3456, 1);
c. SELECT DAYOFMONTH('2009-08-25');
d. SELECT MID('Class 12', 2,3);
Ans. a. 6.57
b. 5.3
c. 25
d. las
( ½ Mark each for each correct answer)
Sample Question Paper: I 9
(c) Consider the table TEACHER given below. Write commands in SQL for (1) to (4) and output
for (5) to (8)
TEACHER
ID Name Department Hiredate Category Gender Salary
1 Tanya Nanda SocialStudies 1994-03-17 TGT F 25000
Saurabh
2 Art 1990-02-12 PRT M 20000
Sharma
3 Nandita Arora English 1980-05-16 PGT F 30000
4 James Jacob English 1989-10-16 TGT M 25000
5 Jaspreet Kaur Hindi 1990-08-01 PRT F 22000
6 Disha Sehgal Math 1980-03-17 PRT F 21000
Siddharth
7 Science 1994-09-02 TGT M 27000
Kapoor
Sonali
8 Math 1980-11-17 TGT F 24500
Mukherjee
(i) To display all information about teachers of PGT category.
(ii) To display all information about teachers of PGT category.
(iii) To list names, departments and date of hiring of all the teachers in ascending order
of date of joining
(iv) To count the number of teachers in English department.
(v) SELECT MAX(Hiredate) FROM Teacher;
(vi) SELECT DISTINCT(category) FROM teacher;
(vii) SELECT COUNT(*) FROM TEACHER WHERE Category = "PGT"
(viii) SELECTAVG(Salary) FROM TEACHER group by Gender;
Ans. (i) SELECT * FROM teacher WHERE category = 'PGT';
(ii) SELECT name FROM teacher WHERE Gender = 'F' AND Department = 'Hindi';
(iii) SELECT name, department, hiredate FROM teacher ORDER BY hiredate;
(iv) SELECT count(*)FROM teacher WHERE department = 'English';
(1 Mark each for each correct query)
(v) 1994-09-02
(vi) TGT
PRT
PGT
(vii) 1
(viii) 24500
24000
10 Sample Question Paper: I
6 (a) Write an SQL query to create the table 'Menu' with the following structure:
Field Type Constraint
ItemCode Varchar(5) Primary Key
ItemName Varchar(20)
Category Varchar(20)
Price Decimal(5,2)
(b) Bill
BillNo CustID Bill_Amt
1 2 12000
2 1 15000
3 2 13000
4 3 13000
5 2 14000
(i) How many rows and how many columns will be there in the Cartesian product of these
two tables?
(ii) Which column in the 'Bill' table is the foreign key?
Ans. (i) 15 rows and 7 columns
(ii) CustID
( ½ Mark each for stating number of rows and columns)
(1 mark for choosing the correct foreign key)
Sample Question Paper: I 11
N2 Nokia 3G Y 8000
B1 BlackBerry N 14000
Customer
CustNo SetNo CustAddress
1 N2 Delhi
2 B1 Mumbai
3 N2 Mumbai
4 N1 Kolkata
5 B1 Delhi
With reference to these tables, Write commands in SQL for (i) and (ii) and output for (iii)
below:
(i) Display the CustNo, CustAddress and corresponding SetName for each customer.
(ii) Display the Customer Details for each customer who uses a Nokia handset.
(iii) select SetNo, SetName
from Handsets, customer
where SetNo = SetCode
and CustAddress = 'Delhi';
Ans. (i) SELECT CustNo, CustAddress, SetName FROM Customer, Handsets Where SetNo =
SetCode;
(1 mark for correct use of SELECT and FROM)
(1 mark for correct use of WHERE clause )
(ii) SELECT Customer.* FROM Customer, HandSets WHERE SetNo = SetCode and
setname like "Nokia%";
(1 mark for correct use of SELECT and FROM)
(1 mark for correct use of WHERE clause )
(iii) setno
N2
B1
(1 mark for each correct line of output)
7 (a) How does e-business improve customer satisfaction- Write one point.
Ans. E-business improve customer satisfaction in the following ways:
Reducing transaction and other costs
Implementing the supply chain efficiently
Improving customer service
Increasing efficiency
Providing access to international markets
(1 Mark for any correct point)
12 Sample Question Paper: I
(b) How has our society benefited from e-governance? Write 2 points.
Ans. e-business
Improved the administrative machinery and delivery of services
Reduced the waiting time before the work is done
( 1 Mark each for any 2 correct points)
(c) Vijayan works for the Customs Department. He wishes to create controls on a form for the
following functions. Choose appropriate controls from Text box, Label, Option button, Check
box, List box, Combo box, Command button and write in the third column.
SNo Control used to: Control
1 Enter last name
2 Enter Gender
4 Submit Form
Ans.
SNo Control used to: Control
3 Choose City from the list of cities List Box or Combo Box
Types of Questions Marks Per Question Total Number of Questions Total Marks
SA I 1 16 16
SA II 2 18 36
LA 6 3 18
Total 37 70
1. (a) Which protocol is used for the transfer of hyper text documents on the internet?
Ans. Hyper Text Transfer Protocol (HTTP) (1 Mark for Abbreviation and/or Full Form)
(b) Which transmission medium should be used to transfer data across two continents at very
high speed.
Ans. Satellite (1 Mark for correct answer)
(c) Two neighbourhood schools, at a distance of 120 metres from each other, decide to join
their LAN using UTP cable so that they can share their e-learning resources. But after joining
their LANs they are not able to share the resources due to loss of signal in-between. Which
device should they use so that signal is amplified in-between?
Ans. Repeater (1 Mark for correct answer)
(d) Which of the following softwares are Open Source:
Linux, MS Windows 7, Photoshop, MySQL
Ans. Linux and MySql (1/2 Mark each for correct software)
(e) Distinguish between Open Source software and Proprietory software with reference to
customizability of the software.
Ans. The difference between proprietary software and open source software are as follows:
(i) Open Source Software: Open standards are those technical standards that are
available publicly and are accepted internationally. The open standards assure that
data can be exchanged or accessed across platforms and applications in case the
technology changes. For example, a new version of a software is released in that case,
the new version would also be open to all.
(ii) Proprietary software: Proprietary standards refer to the type of standards for which
users need to purchase a license. In other words, the license of a proprietary standard
consists of certain specifications that are available to users under certain restrictive
contract terms. These specifications are not available publicly.
(2 marks for correct distinction)
(f) Name any four Indian scripts included in Unicode.
Ans. Devnagari, Bengali, Gurmukhi, gujarati, Oriya, Tamil, Telugu, Kannada, Malayalam (you
can choose any four) (1/2 mark for each script)
(g) Sujata says that the following numbers indicate an address:
208.77.188.166
What is the above address called? To which object/device is it assigned?
Ans. The above address is called an IP Address or Internet Protocol Address. It is a numerical
label that is assigned to devices participating in a network. (1 mark for each part)
Sample Question Paper: II 3
2. (a) Ms. Samhita has developed a Java application through which the students of her school can
view their marks by entering their admission number. The marks are displayed in various
text fields. What should she do so that the students are able to view but not change their
marks in text fields?
Ans. Ms. Samhita should set the editable property of corresponding text boxes to false.
(1 mark for correct answer)
(b) What is the purpose of break statement in a loop?
Ans. The purpose of break statement is to terminate the loop (1 mark for correct answer)
(c) What is the use of <H1> tag in an HTML document?
Ans. <H1> tag is used to display heading with largest font size. (1 mark for correct answer)
(d) What is XML?
Ans. Extensible Markup Language (XML) is used to store and transport data.
(1 mark for correct answer)
(e) 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;
x = 7, y = 4
Ans.
(1 mark for each correct value)
(f) Write code in Java that takes principal, rate, and time as input from textfields and displays
simple interest.
Ans double Principal, Rate, SInterest;
byte Time;
Principal = Double.parseDouble(jTextField1.getText());
Rate = Double.parseDouble(jTextField2.getText());
Time = Byte.parseByte(jTextField3.getText());
SInterest = (Principal*Rate*Time)/100;
jTextField4.setText(Double.toString(SInterest));
(2 marks for correct answer)
(g) Mention the purpose of each of the following HTML tags:
<BR>, <LI>, <HR>, <TABLE>
(g) Richika is a programmer at Alpha Builders. To calculate wages to be paid to labourers she
has developed the following GUI in Netbeans.
Male and Female labourers are respectively paid at the rate of Rs. 140/- per day and Rs.
160/- per day. Skilled labourers are paid extra at the rate of Rs. 50/- per day.
(i) What should be done so that only one of the radio buttons (Male and Female) can be
selected at a time?
(ii) Write code to do the following:
(a) Calculate and display the Total wages in the corresponding label when the
“Calculate Wages” button is pressed.
(b) Clear the Name and No. of days worked textfields.
(c) Close the application when the “STOP” button is pressed.
(You can assume any suitable names for various controls on the form.)
Ans. (i) Both the radio buttons should be put in a button group (1 mark for correct answer)
int rate, days, totalWages;
(ii) (a)
if (maleRB.isSelected()) {
rate = 140;
} else {
rate = 160;
}
if (chkSkilled.isSelected()) {
rate += 50;
}
days = Integer.parseInt(daysTF.getText());
totalWages = days * rate;
wagesLbl.setText(totalWages + "");
( ½ Mark for variable declaration with appropriate data types)
( ½ Mark for calculating wage rate based on gender)
( ½ Mark for recalculating wage rate based on skill)
( ½ Mark for extracting no. of days from the corresponding text field)
( ½ Mark for calculating total pay)
( ½ Mark for displaying total pay in the corresponding label)
Sample Question Paper: II 7
nameTF.setText("");
(b)
daysTF.setText("");
( ½ Mark for each statement)
System.exit(0);
(c)
(1 Mark for correct answer)
5 (a) What is the purpose of DROP TABLE command in SQL? How is it different from DELETE
command?
Ans. The DROP TABLE command removes the entire table from the database. When we drop a
table, all the rows in the table are deleted and the table structure is removed from the
database. Whereas, the DELETE command removes rows from a table. If no WHERE clause is
given, then all rows are removed, but the table structure remains intact.
(1 Mark for explaining DROP TABLE)
(1 Mark for difference between DROP and DELETE)
(b) “PrincipalName” is a column in a table “Schools”. The SQL queries
SELECT count(*) FROM Schools;
and
SELECT count(Principal) FROM schools;
Give the result 28 and 27 respectively. What may be the possible reason for this? How many
records are present in the table – 27 or 28?
Ans. The possible reason for this is that one record in the table has NULL in the PrincipalName
column.
Number of records given in the table is 28.
(1 Mark for each correct part)
(c) Consider the table Projects given below. Write commands in SQL for i) to iv) and output for
v) to viii)
PROJECTS
ID ProjName ProjSize StartDate EndDate Cost
1 Payroll-MMS Medium 2006-03-17 2006-09-16 60000
2 Payroll-ITC Large 2008-02-12 2008-01-11 500000
3 IDMgmt-LITL Large 2008-06-13 2009-05-21 300000
4 Recruit-LITL Medium 2008-03-18 2008-06-01 50000
5 IDMgmt-MTC Small 2007-01-15 2007-01-29 20000
6 Recruit-ITC Medium 2007-03-01 2007-06-28 50000
Model
ModelID CompID ModelCost
T020 1 2000
M032 4 2500
M059 2 7000
A167 3 800
T024 1 1200
Sample Question Paper: II 9
PATIENTS
PatNo PatName Department DocID
1 Neeraj ENT 101
2 Mohit Ortho 201
3 Ragini ENT 101
4 Mohit Paed 102
5 Nandini Ortho 201
With reference to these tables, Write commands in SQL for (i) and (ii) and output for (iii)
below:
(i) Display the PatNo, PatName and corresponding DocName for each patient.
(ii) Display the list of all patients whose OPD_Days are MWF.
(iii) select OPD_Days, Count(*) from Doctors, Patients where Patients.Department =
Doctors.Department Group by OPD_Days;
Ans. (i) SELECT PatNo, PatName, DocName FROM patients, doctors WHERE Patients.DocID =
Doctors.DocID;
(1 mark for correct use of SELECT and FROM)
(1 mark for correct use of WHERE clause )
(ii) SELECT Patients.* FROM Patients, Doctors WHERE Patients.DocID = Doctors.DocID
AND OPD_Days = 'MWF';
(1 mark for correct use of SELECT and FROM)
(1 mark for correct use of WHERE clause )
10 Sample Question Paper: II