Informatics Practices (065)
Sample Question Paper –2
Note
1. This question paper is divided into sections
2. Section – A: 30 marks.
3. Section – B and Section – C: 20 marks each
4. Answer the questions after carefully reading the text.
Section – A
Q 1. Answer the following questions
(a) Explain the following terms: 2
i. UNICODE
ii. GNU
(b) Explain the term Client Server Computing using suitable example. 2
(c) What does Object Oriented Modeling Technique mean? Why do we use UML? 2
(d) Explain the term Data Dictionary, Data Warehousing, Data Mining and Meta Data using suitable 4
Examples.
Q2 Answer the following questions
(a) How do we restrict duplicate rows in SQL SELECT Query? Give example 2
(b) Define SQL Functions. Explain Single Row Functions and its subcategories giving examples in each 4
category.
(c) Differentiate between Row Level Triggers and Statement Level Triggers using suitable example 4
Q3 Answer the following questions
(a) Define the term Errors. Give any two general types of Errors with respect to visual basic error object. 2
(b) Differentiate between System Defined and User Defined functions in Visual Basic. Define a function 4
funCheckNumeric() to check for validity of a numeric value passed as argument to the function. The
function will return True if the value is numeric else will return False.
(c) Define the term Common Dialog Box. Explain the process to include and a Common Dialog Box in a 4
visual Basic form and write the code fragment to show File Open Dialog when mnuFileNew is clicked?
Section – B
Q4 Read the following case study and answer the questions that follows
A Class XII student studying Informatics Practices Course made a Picture Viewer using Visual Basic
as programming tool. He had used a Form with Drive List Box, Directory List Box, File List Box and a
Image control as described in the following table.
Object or Control Type Object Name Description
Form frmPictureViewer The Main Form Object
DriveListBox drvMyDrive To Select Drive
DirectoryListBox dirMyDirectory To select directory in the specified drive
FileListBox filMyFile To select file in the specified directory
Image imgMyImage To hold the image specified in the file box
Software Application
Answer the following questions based on the above program
(a) What is the function Name used to assign picture to an Image Control 1
(b) Give the value for the Pattern Property of File List Box to show only JPEG images. 1
(c) Write the code statement for dirMyDirectory_Change() event such that whenever there is a change in 2
directory list box the file list box (filMyFile )should point towards the file in that directory
(d) Write a code statement for drvMyDrive_Change() event such that whenever there is a change in drive 2
list box the directory list box should get modified
(e) Write a code snippet to trap the error and report it, when user selects a: in the drive list box and there 4
is no floppy disk present in a: (a drive). The drive list box should revert back to c: drive
Q5 Read the following text and answer the questions that follows:
(a) A student of ABCD School, Davis Mathews wanted to make an application to find Even or Odd out of 2
a given number. He had written the following code snippet and he is unable to correct some of the
errors in the code. You are required to help him in correcting the code segment. Find the Errors and
rewrite the corrected code underlining the correction made
‘Program code to check Even or Odd out of a number in a text box txt
Private Sub cmdFind_Click()
if Val(txtNumber) Mod 2 =0
MsgBox "It is an Even Number"
Else
MsgBox "It is an Odd Number"
End Sub
(b) Shankar Giri, a student of Informatics Practices, wanted to make an application to print a message up 2
to some number of times as mentioned in a text box. The code is given to you for correction, do the
required correction and rewrite the corrected code underlining the corrections done
‘Program code to display a message on Clicking of cmdClickMe command button
Private Sub cmdClickMe_Click()
For i = 1 To Val(txtNumber.Text)
MsgBox "I will say Hello at least: " txtNumber.Text + " times"
End Sub
(c) The following code segment is giving error “Overflow” on execution. Find and write the code statement 2
giving this error and also give the reason for the same.
‘Program code to divide a number with another
Private Sub cmdClickMe_Click()
For i = 0 To 10
For j = i To 10
Print j / i
Next
Next
End Sub
(d) Examine the code given in the following code snippet and find how many times the Message will be 2
printed
‘Program Code to print a message in a Message Box using Loops
Private Sub cmdClickMe_Click()
For i = 1 To 3
For j = i To 3 Step -1
MsgBox "I am a message box "
Next
Next
End Sub
(d) A visual basic project contains Project menu having the options Components and References. 2
Differentiate between these two options
Section C
Q6 Read the questions given below and answer accordingly
(a) Write the output produced by the following part of code in PL/SQL 2
DECLARE
Y NUMBER;
X NUMBER;
BEGIN
Y:= 5;
FOR X IN 1..4
LOOP
Y:=X+Y;
DBMS_OUTPUT.PUT_LINE (Y);
END LOOP;
END;
(b) Write the output produced by the following part of code in PL/SQL 2
DECLARE
Y NUMBER;
X NUMBER;
BEGIN
Y:= 5;
FOR X IN 1..5
LOOP
IF X>Y THEN
DBMS_OUTPUT.PUT_LINE (Y);
ELSE
DBMS_OUTPUT.PUT_LINE (X);
END IF;
Y:=Y-1;
END LOOP;
END;
(c) What does a Variable mean and what is meant by its scope? State using suitable example 2
(d) Write a PL/SQL Function OddEven to return value True if the number passed to it is Even else will 4
return False.
6 Answer the following questions based on the following Employee table
Name of Column Type
ID NUMBER (4)
First_Name VARCHAR2 (30)
Last_Name VARCHAR2 (30)
EMail_ID VARCHAR2 (10)
Salary NUMBER (9,2)
(a) Write the difference between a Cursor and a Trigger. 2
(b) Write a PL/SQL procedure EDSAL to find out whether the salary of an Employee with ID = 1234 is 4
less than 5000 or not. If it is less then 5000, modify the Salary of employee by increasing it by 15%.
(c) Write a PL/SQL block to create a trigger to display a Hello message before each insert operation on 4
the table.