selfstudys_com_file (4)
selfstudys_com_file (4)
INFORMATICS PRACTICES
Time allowed : 3 hours Maximum Marks : 70
Instructions :
90 1 P.T.O.
(c) What is the purpose of logical address of computer ? 2
(d) Does open source software only mean that the software is free of
cost ? Give reason for your answer. 2
2. (a) Write the value that will be assigned to variable x after executing
the following statement : 1
x = 20 – 5 + 3 * 20/5;
(c) While working in Netbeans IDE, Amit wants that the text in a Text
area should move to the next line without breaking the word. Which
properties would help him to do that ? 1
90 2
(f) Given below is a code.
<message>
<text>Hello, world!</text>
</message>
(b) Ariya wants to add another column ‘Gender’ in the already existing
table ‘CUSTOMERS’. She has written the following statement.
However, it has errors. Rewrite the correct statement. 1
[MODIFY TABLE CUSTOMERS GENDER char(1);
90 3 P.T.O.
(e) Given below is the ‘Department’ table : 2
DEPCODE DEPNAME
101 ADMIN
102 RECEPTION
103 PERSONNEL
SET AUTOCOMMIT = 0;
UPDATE Department SET DEPNAME = ‘OFFICE’ WHERE
DEPNAME = ‘ADMIN’;
INSERT INTO Department VALUES(104,‘HRD’);
UPDATE Department SET DEPNAME = ‘FRONT OFFICE’ WHERE
DEPNAME = ‘RECEPTION’;
COMMIT;
DELETE FROM Department WHERE DEPNAME = ‘FRONT
OFFICE’;
ROLLBACK;
SELECT * FROM Department;
4. (a) Write the values of r and s after the execution of the following code : 1
int p = 11;
int q = 21;
int r;
int s;
r = ++q;
s = p++;
r++;
90 4
(b) What will be displayed in jTextField1 and jTextField2 after the
following code is executed : 2
int ndigits = 0;
int N = 35;
while (N > 12) {
ndigits = ndigits + 1;
N = N–10;
}
jTextField1.setText(" "+ndigits);
jTextField2.setText(" "+N);
(d) Write the value that will be stored in the variable t after the
execution of the following code. How many times will the loop
execute ? 2
int sum = 0;
int score = 0;
double t;
do
{
90 6
Each Call is charged at < 1·00.
Each SMS is charged at < 0·50.
Users can also opt for Mobile Data Plan. Charges for Mobile Data
Plan are flat < 50·00.
(viii) To display the names of items that have ‘Baby’ anywhere in their
item names. 1
(b) Consider the tables given below and answer the questions that follow : 2
Table : Event
EventId Event NumPerformers CelebrityID
101 Birthday 10 C102
102 Promotion Party 20 C103
103 Engagement 12 C102
104 Wedding 15 C104
Table : Celebrity
CelebrityID Name Phone FeeCharged
C101 Faiz Khan 99101956 200000
C102 Sanjay Kumar 893466448 250000
C103 Neera Khan Kapoor 981166568 300000
C104 Reena Bhatia 65877756 100000
90 8
(i) Name the Primary keys in both the tables and Foreign key in
‘Event’ table.
Can NumPerformers (Number for performers) be set as the
Primary key ? Give reason.
(ii) How many rows will be present in the Cartesian join of the
above mentioned two tables ?
In the table ‘Event’, the CelebrityID 102 is present twice in
the column ‘‘CelebrityId’’. Is there any discrepancy ? Give
reason.
(c) With reference to the above given tables (in Q6 b), write the
commands in SQL for (i) to (iii).
(i) To display EventId, Event name, Celebrity Id and Names of
celebrities for only those events that have more than 10
performers. 2
(ii) To display Event name, Celebrity Id and Names of celebrities
who have ‘‘Khan’’ anywhere in their names. 2
(iii) To display Event name, Names of celebrities and Fee charged
for those celebrities who charge more than 200000. 2
90 9 70,700
P.T.O.
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
General Instructions:
● Marking scheme is the final document for all references with regard to evaluation
and cannot be altered under any circumstances.
● The answers given in the marking scheme are SUGGESTIVE, Examiners are
requested to award marks for all alternative correct Solutions/Answers conveying
the similar meaning.
● All programming questions have to be answered with respect to Java Language only.
● In Java, ignore case sensitivity for identifiers (Variable / Functions ).
● In SQL related questions – both ways of text/character entries should be acceptable
for Example: “AMAR” and ‘amar’ both are correct.
● In SQL related questions – semicolon should be ignored for terminating the SQL
statements.
● In SQL related questions, ignore case sensitivity.
● In SQL related questions, ignore column headers in outputs.
Page #1/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
i) 121.23.1.45
ii) 192.168.0. 254
iii) 192.168.0.1
iv) 198.-1.1.1
Ans Valid IP addresses: (i) , (ii) , (iii)
Invalid IP address: (iv) 198.-1.1.1 because an IP address is a group of four
bytes; each of which can be a number from 0 to 255.
(1 mark for stating all the three valid IP addresses
OR
½ mark for stating any two valid IP addresses)
(½ mark for mentioning invalid address , ½ mark for the reason)
2 (a) Write the value that will be assigned to variable x after executing the 1
following statement:
x = 20 -5 + 3 * 20/5;
Ans 27
(1 Mark for correct answer)
(b) Consider the statement: 1
choice = ‘Y’;
What is the datatype of variable choice? Write Java statement to declare the
variable ‘choice’.
Ans The data type of the variable choice is char.
Declaration : char choice;
(½ mark for stating datatype as char)
(½ mark for declaration)
NOTE : char choice = ‘Y’ ; to be accepted as correct answer and 1
Mark to be allotted.
(c) While working in Netbeans IDE, Amit wants that the text in a Text area 1
should move to the next line without breaking the word. Which properties
would help him do that?
Ans wrapStyleWord property, lineWrap property
( 1 mark for correct answer)
NOTE: Full 1 mark to be allotted if any one of the above properties is
mentioned
(d) Write Java statement to: 1
Append a string "ABC" to the text that is already in the text area named
jTextArea1.
Ans jTextArea1.append("" +"ABC");
OR
jTextArea1.append("ABC");
OR
Page #2/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
jTextArea1.append("ABC"+" ");
( 1 mark for correct answer )
NOTE : (½ mark to be allotted if setText is mentioned instead of append)
(e) Write the output of the following HTML code. 2
<ol start="4">
<li>Bake the mixture in oven for an hour</li>
<li>Remove from oven</li>
<li>Allow the mixture to stand for ten minutes</li>
<li>Serve</li>
</ol></code>
Ans 4 Bake the mixture in the oven for an hour
5 Remove from oven
6 Allow the mixture to stand for ten minutes
7 Serve
(½ mark for each line of output)
NOTE: Full 2 marks to be allotted if :
</code> mentioned as an error
OR
‘Error’ as <li> is an empty tag is mentioned
OR
‘No output’ / ‘Error’ is mentioned
(f) iven below is a code.
G 2
<message>
<text>Hello, world!</text>
</message>
Which language is used to write the above code?
What are <message>, </message>, <text> and </text>?
Ans Language used is XML
<message>, </message>,<text > and </text > are user defined tags
OR tags OR container tags OR <message>, </message> is the root
element and <text>, </text> is the child element.
(1 mark for each part)
(g) Rewrite the following code using if else if statement instead of switch : 2
switch (success) {
case -1: x1 = "No result" ;
break;
case 0: x 1 = "Final result- Not successful";
break;
default: x1 = "result NOT known";
break;
}
Page #3/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
Page #4/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
OR
Any other suitable table mentioning its primary key and foreign key.
( 1 mark for writing any three suitable column names
OR ½ mark for writing any two suitable column names)
( ½ mark for mentioning the Primary Key)
( ½ mark for mentioning the Foreign Key)
NOTE : Tabular representation also to be accepted
(d) Explain the following statement with the help of example: 2
“In a transaction either all the SQL statements be committed or all rolled
back.”
Ans Any MySQL example showing COMMIT, ROLLBACK, AUTOCOMMIT to be
accepted OR definition of transaction
(2 marks for the correct answer)
NOTE : Full 2 marks to be given if 3(e) or 3(f) is attempted.
(e) Given below is the ‘Department’ table: 2
DEPCODE DEPNAME
101 ADMIN
102 RECEPTION
103 PERSONNEL
SET AUTOCOMMIT = 0;
UPDATE DEPARTMENT SET DEPNAME = ‘OFFICE’ WHERE DEPNAME =
‘ADMIN’;
INSERT INTO DEPARTMENT VALUES(104,’HRD’);
UPDATE DEPARTMENT SET DEPNAME = ‘FRONT OFFICE’ WHERE
DEPNAME = ‘RECEPTION’;
COMMIT;
DELETE FROM DEPARTMENT WHERE DEPNAME = ‘FRONT OFFICE’;
ROLLBACK;
SELECT * FROM DEPARTMENT;
What will be the output of the above given SELECT statement?
Ans
DEPCODE DEPNAME
101 OFFICE
102 FRONT OFFICE
103 PERSONNEL
104 HRD
e.g.
WHERE clause:
SELECT * FROM EMP WHERE DEPT = “PHYSICS “ ;
HAVING clause :
SELECT SUM(SALARY), DEPT FROM EMP
GROUP BY DEPT HAVING COUNT(*) > 3;
OR
Any other valid example
(½ mark for Similarity)
(½ mark for Difference)
(½ mark for any correct example of WHERE clause)
(½ mark for any correct example of HAVING clause)
NOTE: 1 mark each for Similarity and Difference to be allotted if
explained with the help of valid example.
4 (a) Write the values of r and s after execution of following code: 1
int p = 11;
int q = 21;
int r;
int s;
r = ++q;
s = p++;
r++;
Ans r = 23
s = 11
(½ mark for each correct answer)
(b) What will be displayed in jTextField1 and jTextField2 after the following 2
code is executed:
int ndigits = 0;
int N = 35;
while (N > 12) {
ndigits = ndigits + 1;
N = N-10;
}
jTextField1.setText(" "+ndigits);
jTextField2.setText(" "+N);
Ans jTextField1 will display 3
jTextField2 will display 5
(1 mark for each correct answer)
(c) Write the value of C after executing the following code: 2
int P;
int R = 8;
Page #6/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
int oddNum;
int C = 0;
for (P = 1; P < R; P=P+3)
{
oddNum = P %2;
if (oddNum == 1)
{
C= C+1;
}
}
Ans 2
(2 marks for correct value of C)
(d) Write the value that will be stored in variable t after the execution of the 2
following code . How many times will the loop execute ?
int sum = 0;
int score = 0;
double t;
do
{
score = score +1;
sum = sum + score;
}
while (score <=3);
t = sum / 3;
Ans Value of t will be 3.0
Loop executes 4 times
NOTE: 3 and 3.3 for value of t should also be accepted
(1 mark for correct value of ‘t’)
(1 mark for correct number of iterations)
(e) The following code has error(s). Rewrite the correct code underlining all the 2
corrections made :
int j;
int i = 15;
int flag = 1;
while( j = 2 j < i; j++)
{
if(i % j = 0)
{
flag == 0;
break;
}
}
Ans Corrected code :
int j;
Page #7/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
int i = 15;
int flag = 1;
for(j = 2; j < i ; j++)
{
if ( i % j = = 0)
{
flag = 0;
break ;
}
}
OR
int j;
int i = 15;
int flag = 1;
j=2;
while(j < i)
{
if ( i % j = = 0)
{
flag = 0;
break ;
}
j++;
}
(½ mark each for correcting any four errors)
OR
(1 mark for only identifying any four errors – without making any
corrections)
(f) Ms. Fauzia works as a programmer in “TelTel Mobile Company” where she has
designed a software to compute charges to be paid by the mobile phone
user. A screenshot of the same is shown below:
Page #8/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
Page #9/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
(iii) When the ‘Exit’ button is clicked, the application should close. 1
System.exit(0);
(1 mark for correct answer)
5 Consider the Table “Infant” shown below.
Table: Infant
ItemCode Item DatePurchase UnitPrice Discount
101 Frock 2016-01-23 700 10
102 Cot 2015-09-23 5000 25
103 Soft Toy 2016-06-17 800 10
104 Baby Socks 2014-10-16 100 7
105 Baby Suit 2015-09-20 500 5
Page #10/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
Page #11/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
OR
AVG(UnitPrice)
1925.0
NOTE : Option 2 to be accepted if updation is taken into consideration.
(1 mark for correct output)
Table: Celebrity
CelebrityID Name Phone FeeCharged
C101 Faiz Khan 99101956 200000
C102 Sanjay Kumar 893466448 250000
C103 Neera Khan Kapoor 981166568 300000
C104 Reena Bhatia 65877756 100000
(i) Name the Primary keys in both the tables and Foreign key in ‘Event’ table.
Can NumPerformers(Number for performers) be set as the Primary key? Give
reason.
Page #12/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
Page #13/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
Page #14/15
CBSE AISSCE 2017 Marking Scheme for Informatics Practices
(Sub Code:065 Paper Code 90/Outside Delhi)
Ans Online retailers usually offer customers a wider range of products at prices
that are lesser than those of traditional stores because they have fewer
infrastructural and operational costs.
(1 mark for stating any valid reason)
(c) Ms. Cathy is creating a form for Vidya University Sports Council application. 2
Help her to choose the most appropriate controls from ListBox, ComboBox,
TextField, TextArea, RadioButton, CheckBox, Label and Command Button for
the following entries.
S.NO. FUNCTION
1. To let the user enter NAME
2. To let the user enter MOBILE NUMBER
3. To let the user choose one PROFESSION out of the categories :
Teaching / Non -Teaching/Research Scholar
4. To let the user select facilities out of Gym, Yoga, Table Tennis,
Badminton and Aerobics. More than one facility may be chosen
Ans
S.NO. FUNCTION CONTROL
Page #15/15