Professional Documents
Culture Documents
Sample Paper Informatics Practices Class Xii Set-Ii
Sample Paper Informatics Practices Class Xii Set-Ii
Sample Paper Informatics Practices Class Xii Set-Ii
INFORMATICS PRACTICES
CLASS XII
SET-II
SECTION-A
Block C Block D
42.Answer the following questions :a.Differentiate between call by value & call by
reference with suitable examples in reference to Method.
2b.What do you understand by access specifier in class derivations? What are
these modes? 2c.What is the difference between container tags and empty tags in
HTML?2d.Name two commonly used drivers used for database connectivity from java
application?2e.What is XML? Write some feature of XML.23.Answer the following
questions :a.Define the following terms in respect of Relational database management
System:
Primary Key.
Referential Integrity.2b.What is the significance of GROUP by clause in SQL query?
2c.Differentiate between DDL and DML command of SQL.2d.Write the resulting output
of the following:
SELECT MONTH_BETWEEN(’12-DEC-98’,’25-JUN-98’) FROM DUAL;
SELECT LENGTH(‘AMIT SHARMA’),SUBSTR(‘AMIT SHARMA’,-5,4) FROM
DUAL;
2e.what are different type of SQL functions?
2SECTION-B4.a Given this fragment
Class X{
Private int count;
Is the following fragment correct? Clarify your answer.
Class Y{
Public static void main(String args[ ] ){
X ob=new X( );
Ob.count=10;
}
}
2bWrite Java Method which takes a number as argument and return the sum of
that number. (Exam. If argument is 254 then method return 2+5+4=11)4cDefine a class
Student with the following specifications:
private members:
admno integer
sname String
eng,math,science double
total double
public member:
(i). parameterized constructor that initialize all the data member of class as values given
by the user.
(ii) showdata( ) method to display all the data member of the class Student on the screen.
Create object of class Student in main method and call showdata( ) method of the class.
45.Answer the following questions :a.Write the output of the following code if program
start from main method: -
Class Student{
public Student(){
calculate( );
System.out.println(“Constructor”);
}
void calculate( ) {
display( );
display( );
System.out.println(“Calculating”);
}
void display( ){
System.out.println(“Displaying”);
}}
Class MAIN{
Public static void main(String args[]){
Student s=new Student( );
}
}
2b.Find the errors from the following code segment and rewrite the corrected code
underlining the correction made.
int a ,b;
c = a + b;
for(;i<=5;i++)
{
Display c;
c=c+1
]2c.Rewrite the following code using do-while loop.
for(int j=1;j<=10;j++){
System.out.println(“#”);
}
System.out.println();
2d.Design a JAVA application in which marks obtained and total marks of student are
entered in the Textfield and upon clicking at the button, the percentage of marks and
corresponding division should be display in the labels.
Marks% Division
>=60 First Division
45-59 Second Division
33-44 Third Division
<33 FAIL4
SECTION-C6.Write the SQL query commands based on following tables:
Table : Book
Book_id
Book name
Author_name
Publisher
Price
Type
Quantity
C0001
Fast Cook
Lata Kapoor
EPB
355
Cookery
5
F0001
The Tears
William Hopkins
First Publi.
650
Fiction
20
T0001
My First c++
Brain & Brooke
FPB
350
Text
10
T0002
C++ Brain works
A.W. Rossaine
TDH
350
Text
15
F0002
Thunderbolts
Anna Roberts
First Publ.
750
Fiction
50
Table : issued
Book_Id
Quantity Issued
T0001
4
C0001
5
F0001
2
1
1
1
1
1
1
1
1
17.(i)Write a SQL command for creating a table student who structure is given below
Field name
Datatype
Size
constraint
Rno
Number
3
Part of primary key
Class
Varchar2
5
Part of primary key
Percentage
Number
5,2
>0 and <=100
(ii) Write a command for adding a field remarks to the above created table whose data
type is varchar2 and size is 40 with not null constraint.
(iii)Write a command for creating view student1 on the student table which contain those
student records who got 75 and above percentage.
(iv) Write command for giving select and update privileges on the above table to the
demo user with grant option.
(v) Write command for removing view student1 from the database.
1
1
1
1