Page 62 - IP
P. 62
(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? 2
(d) Differentiate between Alternate key and Candidate key. 1
Define data encapsulation with reference to Object Oriented
(e) Programming. 1
(f) An 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. l
(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. 2
SELECT*FROM Result WHERE Grade = "Null";
Help Sarthya to run the query by removing the errors from the
query and write the correct Query.
Q4 (a) What will be displayed in jTextField1 after executing the following code. 2
int N = 20;
N = N + l ;
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. 2
if (code ==1)
Day = "Monday" ;
else if (code == 2)
3