Você está na página 1de 8

Time : 3 hours Max.

Marks : 70

1. (a) How do computer networks reduce (c) (i) The reason due to which switches are known as
hardware costs of an organization? Explain intelligent hubs is because they build address table
with the help of example. 2 in hardware to keep track of different hardware
(b) Compare BUS topology with STAR topology. addresses and the port to which each hardware
Give example. 2 address is associated.
(c) (i) Why is a switch called an intelligent hub?2 (ii) Repeaters are mainly used for extending the range.
(ii)When is a repeater used in a computer If you want to connect two computers in a
network? network, which are more than 100 meters apart,
you need repeater.
(d) Expand following term: 2
(i) OSS (d) (i) OSS → Open Source Software
(ii) HTTP → HyperText Transfer Protocol
(ii) HTTP
(e) Firewall It is a system designed to prevent
(e) Explain the term Firewall and Cyber Law. 2
unauthorised access to or from a private network.
Ans. (a) In computer network, users can share hardware Firewalls can be implemented in both hardware
devices such as printer, scanner etc. For example, and software or a combination of both.
an organisation can connect 10 computers with
Cyber Law Cyber law or Internet law is a term that
one printer by communication channel which will
encapsulates the legal issues related to the use of
reduce hardware (printer) cost of an organisation
Internet.
rather than printer attach with individual
computer. 2. (a) Write the value that will be assigned to
(b) In bus topology, computers are connected with variable C after executing the following
each other by a wire in a approximately strait statement: (1)
manner and if one computer stops working the C = 25-5*4/2-10+4;
whole network will stop. While in star topology, (b) Consider the statement: (1)
every computer is connected with the host first_name = "Ayana";
computer and if any client computer stops (i) What is the datatype of first_name?
working, it will not effect the whole network. (ii) Is 325 the same as ‘‘321’’? Give reason.
e.g.
(c) Radhika changed the ‘‘text’’ property of a
Checkbox named jCheckBox1 to ‘‘Reading’’.
What change (if any) will be reflected in its
name property? (1)
(d) Ariya has typed the following comments.
Write the comments using another way.
// This is a comment spreading
Bus topology Star topology // over two lines (1)
(e) Given below is HTML code. Rewrite the (g) Two properties and two methods that are common
correct code underlining all the corrections in jTextfield and jLabel are as follows :
done. Properties Methods
<ol type =‘‘A’’ start = ‘‘D’’> (2) Background setText ()
<li> Bake in oven for an hour Foreground getText ()
<li>Remove from oven
<li>Serve 3. (a) What is the relationship between SQL and
MySQL? (1)
(f) Explain the meaning of the following
(b) Write SQL statement that gives the same
statement with the help of example. (2)
output as the following SQL statement but
‘‘Tags are not predefined in XML’’ uses ‘IN’ keyword.
(g) Name two properties and two methods that SELECT NAME FROM STUDENT WHERE STATE =
are common in jTextField and jLabel. (2) 'VA'; (1)
Ans. (a) Value of C = 9 (c) Which one of the following SQL queries will
(b) (i) String is the datatype of first_name in the given display all Employee records containing the
statement. word ‘‘Amit’’, regardless of case (whether it
was stored as AMIT, Amit, or amit etc.)? (1)
(ii) No, 325 and “321” is not same because 325 will
(i) SELECT * from Employees WHERE EmpName
be consider as integer while “321” will be
like UPPER ‘%Amit%’;
consider as string because 321 is in double quotes
(“ ”) and any value which keeps in double quotes is (ii) SELECT * from Employees WHERE EmpName
considered as string. like ‘%AMIT%’ or ‘%Amit%’ or ‘%amit%’;
(c) The text jCheckBox1 is the default text. You can (iii) SELECT * from Employees WHERE UPPER
change this either in the Properties window or by (EmpName) like ‘%AMIT%’;
right clicking the check box. However, this just (d) If there are 10 rows in ‘Emp’ table and 5
changes the text and not the variable name. The rows in ‘Department’ table, how many rows
variable name will still be jCheckBox1, as you can will be displayed by the following query? (1)
see in the ‘Reading’ area to the left. SELECT * FROM Emp, Department;
(d) Comments in another way— Write the term used for the join being used
/* This is a comment spreading on the two tables mentioned above.
over two lines*/ (e) Kunal has entered the following SQL
(e) The correct code is: command on Table ‘STUDENT’ that has
<ol type = "A" start = "4"> TotalMarks as one of the columns. (2)
<li> Bake in oven for an hour SELECT COUNT (*) FROM STUDENT;
<li> Remove from oven The output displayed is 20.
<li> serve Then, Kunal enters the following command:
</ol> SELECT COUNT (*) FROM STUDENT WHERE
(f) “Tags are not predefined in XML”. TotalMarks <100;
The output displayed is 15.
It means that it supports user defined tags which
user can define as per the requirement. Then, Kunal enters the following command:
e.g. <Note> SELECT COUNT (*) FROM STUDENT WHERE
<To> Tove </To> TotalMarks >=100;
<From> Jani </From> He predicts the output of the above query as
5. Do you agree with Kunal? Give reason for
<Body> Don’t Forget </Body> your answer.
</Note>
(f) In a hospital, patients are allocated to wards.
The tags in the example (like <To>, <From> A database named ‘Hospital’ is created. One
etc) are not defined in any XML standard. These table in this database is: WARD with WardId,
tags are invented by the Author of the XML WardName, NumOfBeds as columns and
document. WardId as the primary key. (2)
Write another suitable table you could (g) Output is :
expect to see in ‘Hospital’ database, with 3
DEPCODE DEPNAME
suitable columns identifying Primary key
and Foreign key. 101 OFFICE
(g) Given below is the ‘Department’ table: (2) 102 FRONT OFFICE
103 PERSONNEL
DEPCODE DEPNAME
104 HRD
101 ADMIN
102 RECEPTION 4. (a) Write the values of c and d after execution of
103 PERSONNEL
following code: (1)
int a = 1;
SET AUTOCOMMIT = 0; int b = 2;
UPDATE Department SET DEPNAME = int c;
'OFFICE' WHERE DEPNAME = 'ADMIN'; int d;
INSERT INTO Department VALUES (104, c =++b;
'HRD'); d = a++;
UPDATE Department SET DEPNAME = c++;
'FRONT OFFICE' (b) What is the difference between
WHERE DEPNAME = 'RECEPTION'; getSelectedIndex() and getSelectedItem()
COMMIT; methods? (1)

DELETE FROM Department WHERE DEPNAME (c) What will be displayed in jTextField1 after
= 'FRONT OFFICE'; the following code is executed? (1)
Also write how many times will the loop
ROLLBACK;
execute.
SELECT * FROM Department;
a = 5;
What will be the output of the above given
b = 2;
SELECT statement?
while (b!=0)
Ans. (a) Relationship between SQL and MySQL is:
{
MySQL and SQL both servers are the two leading r = a%b;
databases that support front end applications a = b;
related to various domains.
b = r;
(b) SELECT NAME FROM STUDENT WHERE STATE }
IN (‘VA’); jTextField1.setText(" "+a);
(c) (ii) SELECT * FROM Employees WHERE (d) Write the values that will be assigned to x, y,
EmpName like '%AMIT%' or '%Amit%' or z and t after executing the following Java
'%amit%'; code:
(d) 50 rows will be displayed. String s1, s2, s3, x, y, z; (2)
Cartesian product used for the join being used on int t;
the two tables mentioned above. s1 = "classxii";
s2 = "cbseboard";
(e) Yes, I agree with Kunal.
s3 = "aisse2016 ";
By First query, total number of student is 20 and by x = s1.substring (5, 8);
second query, 15 students out of 20 students have y = s2. concat (s1);
total marks less than 100. So, by third query only 5 z = s3. trim();
students will be remain who have total marks more t = z. length();
than or equal to 100.
(e) Write the value that will be stored in variable
(f) Another suitable table in Hospital database is num and sum after execution of following
PATIENT with P_ID, P_Name and WardId as code:
columns in which P_ID as the primary key and int sum = 0, num = -2; (2)
WardId as the foreign key. do
{
sum = sum+num;
num++;
}
while (num <1);
(f) The following code has error(s). Rewrite the correct code underlining all the corrections made:
integer counter = 0; (2)
for(num = i; num>=1; num--);
{
If i%num = 0
{
counter = counter + 1;
}
}
(g) Ms. Angela works as a programmer in a Bus Tour Company named ‘‘Heritage Experiences’’. Groups of
people come and reserve seats. There are 3 stopovers for the bus. First stop is at Alwar, second at Jaipur,
third at Udaipur. A group may choose any one destination out of Alwar, Jaipur and Udaipur.
Ms. Angela has designed a software to compute charges to be paid by the entire group. A screenshot of
the same is shown below:

A group can opt for one destination out of Alwar/Jaipur/Udaipur. If the group is ‘‘Frequent Traveller
Group’’, the group gets a 10% discount on Total charges.
Help Ms. Angela in writing the code to do the following:
(i) After selecting appropriate Radio Button and checkbox (if required), when ‘Calculate Charges’
button is clicked, ‘Total Charges’, ‘Discount Amount’, ‘Amount to Pay’ should be calculated and
displayed in the respective text fields. The Charges per person for various destinations are as
follows: (4)
Destination Amount(in `)
Alwar 200.00 per person
Jaipur 500.00 per person
Udaipur 900.00 per person

‘Total Charges’ is obtained by multiplying ‘Number of People in Group’ with Amount per person.
If ‘Frequent Traveller Group’ checkbox is selected, ‘Discount Amount’ is calculated as 10% of ‘Total
Charges’. Otherwise ‘Discount Amount’ is 0.
‘Amount to Pay’ is calculated as:
Amount to Pay = Total Discount_amount =
Charges-Discount Amount. (Total_Charges*10)/100;
(ii) When ‘CLEAR’ button is clicked, all the else
textfields, radio button and checkbox Discount_amount = 0;
should be cleared. (1) jTextField4.setText(Discount_amount)
(iii) When ‘EXIT’ button is clicked, the ;
application should close. (1) float Amount_pay;
Ans. (a) Values of c = 4 and d = 1 Amount_pay = Total_Charges −
(b) getSelectedIndex( ) method retrieves the index of Discount_amount;
the selected item, while getSelectedItem( ) method jTextField5.setText(Amount_pay);
retrieves the selected item. (ii) We need to double click at the ‘Clear’ button
(c) 1 will be displayed in jTextField1. (jButton2) and type the following code:
Two times the loop will be execute. jTextField1.setText(" ");
jTextField2.setText(" ");
(d) Values will be
jTextField3.setText(" ");
x = xii
jTextField4.setText(" ");
y = cbseboardclassxii
jTextField5.setText(" ");
z = aisse2016
jRadioButton1.setSelected(False);
t =9
jRadioButton2.setSelected(False);
(e) Values will be num = 1 and sum = −3
jRadioButton3.setSelected(False);
(f) The correct code is:
jCheckBox.setSelected(False);
int counter = 0; (ii) We need to double click at the ‘Exit’ button
int i=10, num; (jButton3) and the type following code:
for (num = i; num >= 1; num− −) System.exit(0);
{
if (i% num == 0) 5. Consider the table given below:
{ Write Answer to (i). Write SQL queries for (ii)
counter = counter + 1; to (viii) and output for SQL queries (ix) and
} (x).
} Table : Salesperson
(g) (i) We need to double click at the ‘Calculate Charges’
SID Name Phone DOB Salary Area
button (jButton1) and type the following code:
int Total_Charges; S101 Amit Kumar 98101789654 1967-01-23 67000.00 North
int No_of_Person = Integer.parseInt S102 Deepika Sharma 99104567834 1992-09-23 32000.00 South
(jTextField2.getText());
S103 Vinay Srivastav 98101546789 1991-06-27 35000.00 North
if(jRadioButton1.isSelected() ==
True) S104 Kumar Mehta 88675345789 1967-10-16 40000.00 East
Total_Charges = No_of_Person*200; S105 Rashmi Kumar 98101567434 1972-09-20 50000.00 South
else if(jRadioButton2.isSelected()
== True) Note: Columns SID and DOB contain Sales
Total_Charges = Person Id and Data of Birth respectively.
No_of_Person*500; (i) Write the data types of SID and DOB
else if(jRadioButton3.isSelected() columns. (1)
== True) (ii) Display names of Salespersons and their
Total_Charges = No_of_Person*900; Salaries who have salaries in the range
30000.00 to 40000.00. (1)
else
(iii) To list Names, Phone numbers and DOB
Total_Charges = 0; (Date of Birth) of Salespersons who were
jTextField3.setText(Total_Charges); born before 1st November, 1992. (1)
if (jCheckBox.isSelected() == True)
(iv) To display Names and Salaries of Salespersons in descending order of salary. (1)
(v) To display areas in which Salespersons are working. Duplicate Areas should not be displayed. (1)
(vi) To display SID, Names along with Salaries increased by 500. (Increase of ` 500 is only to be displayed
and not to be updated in the table) (1)
(vii) To display Area along with number of Salespersons working in that area. (1)
(viii) To display Names of Salespersons who have the word ‘Kumar ’ anywhere in their names. (1)
(ix) SELECT Name, LENGTH (Name) FROM Salesperson; (1)
(x) SELECT Area, COUNT (*) (1)
FROM Salesperson
GROUP BY Area
HAVING COUNT (*) >1;
Ans. (i) data types of SID is Varchar and data types of DOB is Date.
(ii) SELECT Name, Salary FROM Salesperson
WHERE Salary BETWEEN 30000.00 AND 40000.00;
(iii) SELECT Name, Phone, DOB FROM Salesperson
WHERE DOB<'1992-11-01';
(iv) SELECT Name, Salary FROM Salesperson ORDER BY Salary DESC;
(v) SELECT DISTINCT Area FROM Salesperson;
(vi) SELECT SID, Name, (Salary + 500) As Salary FROM Salesperson.
(vii) SELECT Area, COUNT (*) FROM Salesperson GROUP BY Area.
(viii) SELECT Name FROM Salesperson
WHERE Name LIKE '%Kumar%';
(ix)
Name LENGTH (Name)
Amit Kumar 10
Deepika Sharma 14
Vinay Srivastav 15
Kumar Mehta 11
Rashmi Kumar 12

(x)
Area Count
North 2
South 2

6. (a) ‘‘ABC’’ Event Management Company requires data of events that are to be organized. Write SQL query
to create a table ‘Event’ with the following structure: (2)

Field Type Constraint


EventId Integer Primary key
Event Varchar (50)
DateEvent Date
NumPerformers Integer
(b) Consider the tables given below and answer the questions that follow
Table: Workshop
WorkshopId Title NumSpeakers MeantFor Fee
551 Time Management 3 Senior Manager 7000
553 App Development 1 Computer 9000
Programmer
554 Planning 2 Senior Manager 8000
556 Marketing Strategies 2 Junior Manager 9000

Table: Participant
ParticipantId Name WorkshopId
100 Prabhu Shankar 551
101 Dev Sen 554
102 Fauzia Khan 551
103 Tom Winters 553

(i) WorkshopId ‘552’ is missing in the table Workshop. Is there any discrepancy (something not
correct)? Give reason for your answer. (1)
(ii) WorkshopId ‘551’ is present twice in the table Participant. Is there any discrepancy? Give reason for
your answer. (1)
(c) With reference to the above tables (in Q.6-(b)), write commands in SQL for (i) to (iii) given below: (6)
(i) To display names of Participants along with workshop titles for only those workshops that have more
than 2 speakers.
(ii) To display ParticipantId, Participant’s name, WorkshopId for workshops meant for Senior
Managers and Junior Managers.
(iii) To display WorkshopId, title, ParticipantId for only those workshops that have fees in the range of
5000.00 to 8000.00
Ans. (a) The SQL command to create a table as per given structure is as follows :
CREATE TABLE Event (EventId Integer Primary key,
Event Varchar (50),
DataEvent Date,
NumPerformers Integer);
(b) (i) No discrepancy, because there is no compulsion to give IDs in sequence order.
(ii) No discrepancy, because it is not the primary key in the table Participant.
(c) (i) SELECT Name, Title FROM Participant P, Workshop W
WHERE P.WorkshopId = W.WorkshopId AND NumSpeakers>2;
(ii) SELECT ParticipantId, Name, WorkshopId
FROM Participant P, Workshop W
WHERE P.WorkshopID = W.WorkshopId AND MeantFor IN('Senior Manager', 'Junior Manager');

(iii) SELECT WorkshopId, Title, ParticipantId


FROM Participant P, Workshop W
WHERE P.WorkshopId = W.WorkshopId AND FEE BETWEEN 5000.00 AND 8000.00; (2)

7. (a) (i) Define E-governance.


(ii) List two advantages of E-governance to a disabled person.
(b) How does E-business help organizations to provide better customer services? (1)
(c) Ms. Fauzia is creating a form for an application to be used in a Gym. Help her to choose most
appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and
Command Button for the following entries: (2)
S.No Function
1 To enter NAME
2 To enter EMAIL ID
3 To allow user to choose any one MEMBERSHIP DURATION out of 1
Month, 3 Months, 6 Months, 1 year.
4 To choose PRE-EXISTING MEDICAL CONDITIONS out of Diabetes,
Heart Disease, Chest Paie, Shortness of Breath, Epilepsy, Others.

Ans. (a) (i) E-Governance


E-Governance (Electronic Governance) is the effective use of information and communication technology (ICT) to
improve the system of governance that is in place and thus provide better services to the citizens.
(ii) Two advantages of E-governance to a disabled person are as follows
• E-Governance provides right information to the disabled person so that, they can make better lives for themselves and
for their next generation.
• Complete implementation of e-governance in India will include building technical infrastructure. These building
technical infrastructure, disabled persons must also be considered.
(b) Online self-service, Email and text (sms) push notification etc services given by E-business help the organisations to
provide better customer services.
(c)
S.No. Function Control
1. To enter Name TextField
2. To enter EMAIL ID TextField
3. To allow user to choose any one MEMBERSHIP RadioButton
DURATION out of 1 Month, 3 Months, 6 Months, 1 year
4. To choose PRE-EXISTING MEDICAL CONDITIONS out of CheckBox
Diabetes, Heart Disease, Chest Paie, Shortness of Breath,
Epilepsy, Others

Você também pode gostar