CBSE Sample paper class XII Informatics practices 2008 1


Sample Paper – 2008

Class – XII
Subject
– Informatics Practice

TIME : 3 Hrs M.M : 70

Q1. Answer the following questions:

(a) Write one point of difference between:

(i) Freeware and Free software. (ii) Front end and Back end technology (2)

(b) How is post implementation review important during System Development Life Cycle? (2)

(c) Explain in brief the following terms: (2)

(i) GNU (ii) Data Mining

(d) Identify the type of relationship represented in the following statement and draw an Entity Relationship Diagram to show it: (2)

“A customer can buy many items.”

(e) What does Object Modeling technique mean? Why do we use UML? (2)

Q2. Answer the following questions:

(a) Write one common characteristic and one difference between a control and a variable in VB. (2)

(b) Why do we specify comments in a program? What are the two ways of writing comments in VB. (2)

(c) Which statement can be used in place of Select Case statement? In the Select Case statement, what happens, if every case fails and there is no Case Else option? (2)

(d) How many value(s) does a function and a procedure return? (1 ½ )

(e) Distinguish between SDI and MDI with example. Explain the concept of parent and child form in the similar context. (2 ½ )

Q3. Answer the following questions:

(a) What is the use of %ROWTYPE attribute? Explain with the help of an example. (2)

(b) What is trigger? Name two types of triggers available in PL/SQL. (2)

(c) What do you understand by the term data – bound controls? Name any two data – bound controls that can be used on a form. (2)

(d) Explain the usage of INOUT parameter of a PL/SQL procedure with the help of an example. (2)

(e) What are group functions of SQL? Name any two group functions of SQL with the help of an example. (2)

Q4. Read the following case study and answer the questions that follow:

ABC Company has developed the following interface to enter and display data related to Income Tax of employees.

The form details of the above form are given in the following table:

Object Type

Object Name

Description

Form

FrmSalary

The main form object

Text Box

TxtEmpCode

To enter code of the employee

TxtName

To enter name of the Employee

TxtIncome

To enter Taxable Income of the Employee

TxtTax

To display Income Tax

TxtEDTax

To display Education Tax

TxtSurcharge

To display Surcharge

TxtIncomeTax

To display total tax to be paid by the employee

Command Buttons

CmdCalculate

To calculate Income Tax, Education Tax, Surcharge and Total Tax

CmdClaer

To clear all the values in the text boxes

CmdExit

To close the application.

Write the code to implement the following:

(a) When the form loads text boxes for Income Tax, Education Tax, Surcharge and Total Tax Amount should be disabled. They should also be enabled when Calculate command button is clicked. (2)

(b) Taxable income entered should be numeric data only. (2)

(c) When the user clicks the clear command button, the text boxes EmpCode and EmpName should be set to blank and other textboxes should be set to zero. (2)

(d) When calculate command button is clicked, Income Tax, Education Tax, Surcharge and Total Tax (sum of Income Tax, Education Tax and Surcharge) is displayed in their respective text boxes based on the following criterion: (4)

Taxable Income

Income Tax

Education Tax

Surcharge

Upto Rs. 1,00,000

Nil

Nil

Nil

Rs. 1,00,001 -Rs. 1,50,000

10% of the amount exceeding Rs. 1,00,000

2% of Taxable Income

Nil

Rs. 1,50,001 – Rs.2,50,000

Rs. 5000 + 20 % of the amount exceeding Rs. 150,000

2% of Taxable Income

Nil

Rs. 2,50,001 and above

Rs. 2,50,000 + 30% of the amount exceeding Rs. 2,50,000

2% of Taxable Income

1% of the Taxable Income

Q5. Answer the following questions:

(a)How many times the following message will be printed: (1)

Private Sub cmdclickme_click ( )

For I = 1 To 3

For J = 1 To 3 step -1

Msgbox (“It is a message box”)

Next I

Next J

End Sub

(b) How many times the following loop execute? (1)

I = 6

DO WHILE I > = -1

I = I – 2

PRINT I

LOOP

(c) Rewrite the following code segment using If..Else..Endif: (2)

Select Case Code

Case Is > 45

M = “Error”

Case 10 To 20

M = “Accounts”

Case 21 To 30

M = “Personnel”

Case 31 To 45

M = “EDP”

Case Else

M = “Access Denied”

End Select

(d) Write a function that receives two integers as arguments and returns the following: (2 ½ )

0 if both are equal

-1 if the first is greater than the second

1 if second is greater than the first.

(e) Write a procedure in VB that takes year of birth of a person as an argument. It displays a message box indicating how many years are left for the person to reach the retirement age of 60.If the user is older than 65, wish him / her for a long life!! (2 ½ )

(f) The following code segment gives “overflow” error on execution. Find and write the code segment giving this error and also give reason for the same: (1)

‘Program code to divide a number with another’

Private Sub cmd1_click ( )

Dim I, j as integer

For I = 0 to 35710

For j = 1 to 10

Print j /i

Next

Next

End Sub

Q6. Read the questions carefully and answer them accordingly: (1)

(a) For I In 1 .. 2

Loop

If I = 1 then

Calc_bonus (president_id, 2000000);

Elsif i = 2 then

Calc_bonus(ERP_id, 50000000);

End if;

End loop;

(b)Write the output produced by the following part of code in PL/ SQL: (2)

Declare

I number;

Q number;

P number;

Begin

P := 2;

Q := 5;

FOR I IN 5 . . 7 LOOP

Q : = Q + 2;

P : = Q;

IF P > 9 THEN

DBMS_OUTPUT.PUT_LINE (P);

END IF;

DBMS_OUTPUT.PUT_LINE (I);

END LOOP;

END;

(c) Find the errors in the following PL/SQL code and rewrite the correct code after underlining the corrections made: (2)

Declare

P number;

Pr number;

For X in 3 . . 6 Loop

If MOD ( X, 3) := 0 Then

Pr : = Pr * X;

Dbms_output.put_line( To_Char(Pr));

End of Loop;

End

(d) Write a PL/SQL procedure called MULTI_TABLE that takes two numbers as parameters and displays the multiplication of the first parameter till the second parameter. (2 ½ )

(e) Write a PL/SQL function that displays the sum of all even numbers from 1 to 10. (2 ½ )

Q7. Answer the questions based on the table CLUB given below:

Table: CLUB

Column Name Data Type Size Constraint Description

Member_No Number 4 Primary Key Member Number

Member_Name Varchar2 30 Not Null Name of the member

Address Varchar2 30 Address of the member

Age Number 4 > = 18 Age of the member

Type Varchar2 10 set default value to T1 Type of membership

Fees Number 6, 2 Membership Fees

(a) Write a SQL command to create the table CLUB including the constraints. (2)

(b) Write a SQL command to create a view consisting of all the members whose names are four lettered. (1 ½ )

(c) Write a PL/SQL code to increase the fees by 5% for a member name accepted from the user if the type of membership is ‘T2’. (2)

(d) Write a PL/SQL code to display the details of all the ‘T1’ members whose age is greater than 50. The code should also display the total membership fees of all such members. (2 ½ )

(e) Create a trigger to display the member name and the age whose records is / are being deleted from the Club table. (2)

 

iCBSE India