0% found this document useful (0 votes)
284 views11 pages

90 Informatics Practices

The document is an exam paper for the subject of Informatics Practices. It contains 7 questions and is 11 printed pages long. Candidates are instructed to write the code number on the title page of their answer book and are given 15 minutes to read the paper before answering begins.

Uploaded by

Thushara K s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
284 views11 pages

90 Informatics Practices

The document is an exam paper for the subject of Informatics Practices. It contains 7 questions and is 11 printed pages long. Candidates are instructed to write the code number on the title page of their answer book and are given 15 minutes to read the paper before answering begins.

Uploaded by

Thushara K s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

SET-4

Series BVM/C Code No. 90


Candidates must write the Code on the
Roll No.
title page of the answer-book.

 Please check that this question paper contains 11 printed pages.


 Code number given on the right hand side of the question paper should be
written on the title page of the answer-book by the candidate.
 Please check that this question paper contains 7 questions.
 Please write down the Serial Number of the question before
attempting it.
 15 minute time has been allotted to read this question paper. The question
paper will be distributed at 10.15 a.m. From 10.15 a.m. to 10.30 a.m., the
students will read the question paper only and will not write any answer on the
answer-book during this period.

INFORMATICS PRACTICES

Time allowed : 3 hours Maximum Marks : 70

Instructions :

(i) All questions are compulsory.

(ii) Answer the questions after carefully reading the text.

(iii) Q. 2 and Q.4 have to be answered with respect to Java Language.

(iv) Q.3, Q.5 and Q.6 have to be answered with respect to MySQL.

90 1 P.T.O.
1. (a) (i) Out of the following Networks, which one is LEAST likely to
be a WAN (Wide Area Network) ?
Internet, Branches of a Bank, Network within a School
(ii) Name one Communication Media used in WAN. 2
(b) A College has a network that has to be used by the management
only. Explain 2 methods used to ensure that only a few authorized
people are allowed access to that network. 2
(c) Name the unique address consisting of a 12-digit hexadecimal
notation, assigned to a network card that identifies the Network
Card. What are the two main components of this address ? 2
(d) Explain in brief any two freedoms offered by open source software. 2
(e) Write one point of similarity and one point of difference between
ASCII and Unicode. 2

2. (a) Distinguish between Java and Netbeans. 1


(b) Identify invalid variable names from the following. State reason(s) if
invalid. 1
(i) 1Marks
(ii) Marks1
(iii) for
(iv) _sales
(c) (i) Which property of jList component lets us add items in a
ListBox ?
(ii) Sanya has created a List box on her form and has set the
selectionMode property to MULTIPLE_INTERVAL. What is
the purpose ? 2
OR
(ii) Write one main difference between List box and Combo box.
(d) Name four HTML tags that are needed to form the basic structure
for every HTML file. 2
OR
Distinguish between HTML and XML. Write two points.

90 2
(e) What will be displayed in jTextField1 and jTextField2 ? 2
int x,y,z,t;
x = 7;
y = 10;
z = x+y*6;
t = x + y;
jTextField1.setText(""+z);
jTextField2.setText(""+t);

(f) Write the output that will be displayed on jLabel1 and jLabel2. 2
String a,b,c,d,x;
a="Computers";
b="are";
c="really";
d="interesting";
int e = a.length()/3+b.length()*2;
x=b+c+d;
x=a.concat(x);
jLabel1.setText("The value of e ="+ e);
jLabel2.setText(x.toUpperCase());

3. (a) While creating a table, which constraint applied on a column


ensures that the column will not be able to contain NULL values as
well as all the rows will have unique values for that column ? 1

(b) Ajay is inserting data in a table named ‘Friend’’ without adding


values in Address column for some of the records. What value does
MySQL save in such columns ? 1
OR

Write SQL statement to display details of only those records where


Ajay entered no values in the ‘‘Address’’ column ?

90 3 P.T.O.
(c) (i) Name any 2 Group/Aggregate functions used in MySQL.

(ii) Table ‘SCHOOL’ has details about students in a school. One of


its columns is ‘HOUSE’ that stores the house that the student
belongs to. The data in HOUSE column may be
‘Gandhi’/‘Naidu’/‘Bose’/‘Bhagat’.

Write SQL query to fetch the number of students in ‘Bose’


house. 2

(d) Consider the following table :


Table : Results
STUDENTID NAME EXAMID SCORE
10 Leena 1 20
10 Leena 2 25
11 Samarth 1 30
11 Samarth 2 35
12 Jai 1 14
12 Jai 2 15
14 Shoaib 1 30
14 Shoaib 2 12

Abhay wants to know the number of Students who took the test. He
writes the following SQL statement to count Studentid without
duplicates. However the statement has error(s). Rewrite the correct
statement. 2

SELECT DISTINCT(COUNT STUDENTID) FROM Results;

(e) Naman is using the following SQL statement to delete the row for
ROOMID = 15 from the table ‘‘ROOM’’

DROP ROOM WHERE ROOMID EQUALS 15;


However he is getting error. Rewrite the correct statement. 2

90 4
(f) Consider the following table ‘Student’ 2
Table : Student
RNO NAME PHONE AGE CITY
1 Ramesh Kumar 934578912 18 Bengaluru
2 Amit Singh 980452317 18 Mumbai
3 Niharika Yadav 934512367 20 Delhi
4 Timi Anand 911984334 18 Mumbai
5 Shoaib Khan 876534902 20 Bengaluru
6 Aman Malik 981178655 18 Delhi
Write SQL queries to
(i) Create a point SP1 in a transaction such that you can roll the
transaction back to SP1 without rolling back the entire
transaction in case of failure.
(ii) Increase AGE in every row by 2.
OR
Insert a new row in the table with appropriate values.
(iii) Undo (Cancel) the changes made in the table, that is, Roll the
transaction back to SP1.

4. (a) Write the value of R after the following code is executed. 2


int P= 3, Q = 6, R;
R=0;
if( P >3)
R = R+1;
else if ( P <= 3 && Q>6)
R=R+2;
else if ( P < 3 && Q < 7)
R= R+3;
else if ( P<3 || Q <7)
R= R+4;
else
R = R+5;
90 5 P.T.O.
(b) Write the values of variables code and z after execution of the
following code : 2

int z;
z = 0;
char code;
code = ‘w’;
switch (code)
{
case ‘w’ : z = z+1;
case ‘r’ : z = z+2;
break;
case ‘s’ : z=z +3;
break;
default : z = z+4;
}
OR
What happens if break statement is omitted with a case in switch
statement ?

(c) How many times will the ‘while’ loop execute ? 2

int K = 7;
int I = -2;
while (I <= K) {
I = I + 2;
K=K-1;
}
OR
What different values will the variable I take when the ‘while’ loop
is executed ?

90 6
(d) The following code has error(s). Rewrite the correct code underlining
all the corrections made : 2
int A assigned 3;
int I, sum = 0;
for {I = 1, I<=5, I=I+1}
{
A = A-2
sum = sum +2;
}
(e) Write the output that will be displayed in jTextField1 : 2
int i,j,k;
i = 30;
j = 10;
k = 0;
do
{
i = i - 5;
k = k + i;
}
while (i > j);
jTextField1.setText(""+k);
(f) Ms. Priya works for a school. She is motivating the students of her
school to drink more water daily. She has created an interface. A
screenshot of the same is shown below :

90 7 P.T.O.
The student has to enter weight in kg and how much exercise
(No/Less/Moderate/Heavy) is done by him/her.

 Amount of Water (in litres) is calculated by dividing the


weight by 25. (This is the amount of water needed without
accounting for Exercise)

 Amount of Water (For exercise) is calculated using the


following criterion :
Type of Amount of water (For
Exercise Exercise)
No 0
Less 0.35 litres
Moderate 0.65 litres
Heavy 0.9 litres

 Total Amount of Water (in litres) is the sum of Amount of


water (in litres) and Amount of water (For Exercise).

 Total Amount of Water (glasses) is calculated by dividing the


Total Amount of Water (in litres) by 5.

Help Ms. Priya in writing the code to do the following :

(i) When ‘‘Calculate Amount of Water’’ is clicked : 4

 ‘‘Amount of Water (in litres)’’, ‘‘Amount of Water (for


Exercise)’’, ‘‘Total Amount of Water (in litres)’’ and
‘‘Total Amount of Water (Glasses)’’ is calculated and
displayed in respective Textfields.

(ii) When ‘CLEAR’ button is clicked, all the textfields and


radiobuttons should be cleared. 1

(iii) When ‘Exit’ button is clicked, the application should close. 1

90 8
5. Consider the table given below. Write SQL queries for (i) to (viii) and
output for (ix) and (x)
Table : Gym
REGID NAME PREWEIGHT CURRWEIGHT DOJ GENDER BRANCH

1001 SHEELA SIA 115 98 2017-09-02 F ADARSH VIHAR

1002 FAWAD KHAN 92 80 2018-10-11 M MODEL TOWN

1003 PAWAN SINGH 85 80 2018-02-03 M NIRMAN NAGAR

1004 SUPRIYA ARORA 113 100 2018-01-16 F MODEL TOWN

1005 AJOY BASU 67 75 2017-12-09 M NIRMAN NAGAR

1006 TANMAY JACOB 100 71 2017-11-18 M ADARSH VIHAR

1007 LAKSHMI VENKAT 98 95 2018-06-09 F MODEL TOWN

Columns REGID stores Registration Id, PREWEIGHT stores weight of the


person before joining Gym, CURRWEIGHT stores current weight, DOJ
stores Date of Joining, BRANCH stores the branch of Gym where the
person has enrolled.
(i) To display names of members along with their previous and current
weights who are in Model Town branch. 1
(ii) To display all names of members, previous weight, current weight,
Change in weight (i.e. how much increase from previous weight or
decrease from previous weight, Decrease will be displayed with
negative sign) 1
(iii) To display BRANCH wise count of members in the Gym. (i.e. display
the BRANCH and number of members in each BRANCH) 1
(iv) To display names and date of joining of all the members who joined
in the year 2018. 1
(v) To display Names and Current weight of all the members in
descending order of Current Weight. 1
(vi) To display the names and date of joining of male members who have
joined after 27th September 2018. 1
(vii) To display Gender wise, maximum current weight (i.e. display the
gender and maximum current weight of each gender) 1
(viii) To display names and date of joining of members who have their
names starting with ‘S’ and ending with ‘a’. 1
(ix) SELECT BRANCH, MAX(PREWEIGHT) FROM Gym
GROUP BY Branch
HAVING COUNT(*) <= 2; 1
(x) SELECT MAX(DOJ),MIN(DOJ) FROM Gym; 1
90 9 P.T.O.
6. (a) Write SQL query to create a table ‘Product’ with the following
structure : 2
Field Type Constraint
ProductId Integer Primary key
PName Varchar(50) Not Null
Qty Integer
DatePurchase Date
SuppCode Varchar(4)
(b) Consider the following tables TRANSPORTER and DRIVER and
answer the questions that follow :
Table : TRANSPORTER
ORDERID ITEM TRANSPORTDATE DESTINATION DRIVERID

1120 TELEVISION 2019-03-19 MUMBAI D103

1121 REFRIGERATOR 2019-04-12 UDAIPUR D101

1122 TELEVISION 2019-05-06 MUMBAI D101

1123 MICROWAVE 2019-05-07 KANPUR D103

1124 FURNITURE 2019-06-15 KANPUR D102

Table : DRIVER
DRIVERID DRIVERNAME DRIVERGRADE PHONE

D101 Radhey Shyam A 981234567

D102 Jagat Singh 981017897

D103 Timsy Yadav B

D104 Zoravar Singh A 981107887

(i) Can the column ‘PHONE’ be set as the primary key of the
table DRIVER ? Give reason(s). 1
OR
Identify the Primary key in the table ‘DRIVER’. Give
reason(s) for your choice.
(ii) In the PHONE column of ‘‘DRIVER’’ table, each phone
number is taking same number of bytes (being padded with
spaces to specified length) irrespective of the number of
characters actually stored in that column. Which data type
has been used for PHONE column ? 1
OR
Identify data type and size to be used for column DRIVERID.

90 10
(c) With reference to the above given tables (in Q6 b), write commands
in SQL for (i) to (iii) :
(i) To display OrderId, Item being transported, DriverId and
names of Drivers for all the orders that are being transported
by drivers with ‘A’ grade. 2
(ii) To display DriverId, Names of drivers and Travel dates for
drivers who are travelling after 1st March, 2019. 2
OR
How many rows will be there in Cartesian product of the two
tables in consideration here ?
(iii) To display OrderId, DriverId and names of Drivers for all the
orders that are transporting TELEVISION. 2

7. (a) As a part of e-Governance initiatives, now certificates issued to


individuals can be stored in individual ‘digital lockers’ and can be
accessed by Government/other departments. Write two ways in
which Digilocker will help the students. 1
(b) ABCshoppers.com is a company that sells goods online. It has
employed a software engineer to develop and maintain their system.
State one Computer Crime about which the Software engineer must
be most concerned. 1
(c) Ms. Smridhi is creating a form for ‘‘Second hand Cars Store’’
application. Help her to choose the most appropriate controls out of
ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox,
Label and Command Button for the following entries : 2

S.No. Function

1. To let the user enter NAME of car.

2. To let the user enter Date of Arrival of car in the Store.


3. To let the user choose one Condition out of the
conditions : Excellent/Average/Bad
4. To let the user enter Remarks about the car. It can be a
short paragraph.

90 11 P.T.O.

You might also like