Sample Paper – 2009
Class – XII
Subject – Informatics Practices
Time allowed: 3 hours Maximum Marks: 70
NOTE:
(i) All questions are compulsory. .
(ii) Answer the questions after carefully reading the text.
Section – A
1. Answer the following Questions :
a) What is information system? Write different types of information system? 2
b) What does object modeling technique mean? Why do we use UML? 2
c) How can you differentiate interviewing from questionnaires? . 2
d) Define Generalization and Specialization. 2
e) What is Metadata and data dictionary? 2
2. Answer the following questions:
a) What is variable lifetime? Which variable has longest lifetime? 2
b) What is Container control? How can a picture box be used as a container? 2
c) Write the differences between ADODB and ADODC data control? 4
d) Which loop executes when the given condition is False? Explain with an example. 2
3. Answer the following Questions :
a) State any two advantages of PL/SQL over SQL. 2
b) What is trigger? Name the statements for which triggers are executed. 2
c) Write the differences between DDL and DML/ 2
d) Write the differences between procedure and function? 2
e) Define Transaction and define the different types of transaction? 2
Section – B
Q. 4. Read the following case study and answer the questions that follow.
Paradise Company is a dealer of goods. The company’s programmer has made the following from to calculate the total cost of the order of the customers. The total cost is calculated as per the following criteria.
For Units Price For wholesalers Price for Retailers
1-30 Rs. 100/- Rs. 80/-
31-70 Rs. 90/- Rs. 70/-
>70 Rs. 60/- Rs. 50/-
Special customers are given a discount of 20%.
| Object Type | Object Name | Description |
| Form | FrmParadise | Main Form |
| Text Box | txtUnitOrdered | To enter Unit Ordered |
| txtTotalCost | To show calculated cost | |
| Check Box | chkSpCust | To be checked if customer is special |
| Option Button | optWholesalerl | To Provide customer type |
| optRetailer | ||
| Command Button | cmdCalcCost | To calculate total cost |
| cmdClear | To clear the entered values | |
| cmdQuit | To close the application |

- Write the commands to disable the text boxes txtPercentage and txtGrade. 1
- Write the code for text boxes txtFirstTerm or txtSecondTerm which accept only numeric data. 1
- Write the code for cmdCalcPer to calculate the percentage after finding the total marks of first term and second term (assuming that both marks are out of 100). Also ensure that NCC cadets get an increment of 5% in their percentage. 3
- Write the code for cmdCalcGrade to calculate the grade depending on the stream selected according to the criteria given above. 3
- Write the code for cmdClear command button to clear all the text boxes and check box. Also write the code for cmdExit to close the application. 2
Q.5 Read the following text and answer the questions that follow:
(a) Find out the Error(s) in the code fragment if any: 2
Private Sub Ret(ByVal num As Integer)
Dim sum1 As Integer
For I = 1 to num
Sum1 = sum1 + num
Next
Ret = Sum1
End Sub
(b) Find the Output of the following code segment: 2
x = “class” (2)
Print (5 * 4 > 8 + 3) And (3^2 <>
(c) Re-write the following code segment using a Select Case construct: 2
IF a = 1 THEN
Picoutput.print “Earth”
Elseif a >=3 and a<=4 Then
Picoutput.print “ Mars”
Elseif a = 5 OR a = 7 Then
Picoutput.print “Saturn”
END IF
(d) Write a program in VB to enter any number and display all the even and odd numbers upto that number and find their respective sums. 4
SECTION-C
6 (a) Write the output produced by the following PL/SQL code segment when gross_sale entry by the user is 3850. 2
VARIABLE amount NUMBER;
DECLARE
actual_sale NUMBER (9,2):= &gross_sale;
BEGIN
IF actual_sale> 2000 THEN
actual_sale:= actual_sale – 500;
ELSE
actual_sale:= actual_sale – 100;
END IF;
:amount= actual_sale;
END;
/
PRINT amount
(b) Find the errors in the following PL/SQL code and rewrite the corrected code underlining the correction made: 2
DECLARE
v_no Emp.Ename & ROWTYPE;
v_sal NUMBER (7,2)=1000;
BEGIN
SELECT sal TO v_sal FROM Emp WHERE Eno=v_no;
v_no = v_no + 1;
EXIT FOR v_no > 5;
END
END;
(c) Explain the usage of %TYPE attribute in variable declaration in a PL/SQL block within the help of an example. 2
(d) Write a PL/SQL procedure that calculates and displays the volume of a box. The procedure takes three parameters for length, width and height of the box respectively. The last two parameters are optional having a default value of –1. If the last two parameters are not passed then the volume of a box having sides equal to the first parameter is to be calculated. 4
7. Answer the following questions: 2+3+2+3=10
CUSTOMER
| Column Name | Data Type | Size | Constraint |
| Cust_id Custname Permanent_address Postall_address Tot_purchase_cost | Number Varchar2 Varchar2 Varchar2 number | 7 30 20 20 7,2 | Primary key Not null Not less than 2000 |
a) Write the SQL Command to create the above table including its Constraints.
b) Write a PL/SQL cursor to select the total No. of people who earn <>
10000/- to 20000/- in a month. insert both groups into SunEmp Table.
b) Write a trigger to avoid data entry for emp table having e_name=’Manpreet Singh’.
d) Write a pl/sql function to calculate salary with 25% bonus to the highest salary paid EMP.
