|
|
Do you want 100% Marks with less
effort Prepare the Following YSA Paper for YOU.?
Class – XII
SUBJECT - Informatics Practices
Note:
i) This Question paper
contains total 4 pages.
ii) This question paper is
divided into three sections.
iii) All questions are
compulsory.
iv) Section – A consists
of 30 marks.
v) Section – B and Section
– C are of 20 marks each
vi) Answer the questions
after carefully reading the text.
Section – ‘A’
Q1. Answer the following questions:
(a)What do you understand by a
One-to-Many Relationship and Many-to-One Relationship?
Explain with the help of example. [2]
(b) Differentiate ER Modelling and
Object Modelling Techniques. [2]
(c) Define the following terms in the
context of Database
(i) W3C
(ii) Tomcat [2]
(d) What is Normalization? Explain
different normalization forms. [4]
Q2. Answer the following questions:
(a) What is error in VB? Differentiate
between each of them? [2]
(b) Differentiate between Do While loop
and Do Until loop in VB; also give suitable example of each.
[2]
(c)Define the term Library Functions in
VB. Name the different categories of library functions
available in VB. Give the syntax of any two library
functions. [2]
OR
(c) What do you understand by ByVal or
ByRef in VB. Which is by default? [2]
(d) Explain the following Terms
(i) Modular Programming
(ii) Object Oriented Programming
(iii) Event Driven Programming
(iv) RAD [4]
Q3. Answer the following questions:
(a) What is PL/SQL? What advantages it
provides over SQL. [2]
(b) What is Cursor? Explain the steps to
follow while writing a Cursor. [2]
(c)What is the difference between
“Trigger and Constraints” or “Trigger and Stored
Procedure” in PL/SQL? [2]
(d) What is Function? How it is
different from Procedures? Also give syntax of each block.
[4]
Section – ‘B’
Q4. Read the following case study and
answer the questions that follow:
The SHOP n SAVE store has developed the
following data entry screen for its operations. The store
offers three different types of membership discount schemes
for its regular customers. Platinum members get a discount
of 10% on all their purchases, Gold members get 5% and
Silver members get 3% discount.
Consider the following data entry screen:
The setting of the controls on the form are given below:
|
Object Type
|
Object Name
|
Description
|
|
Form
|
frmCust
|
To Main Form Object
|
|
Text Box
|
txtProduct
|
To enter name of the product
|
|
txtQty
|
To enter quantity sold
|
|
txtRate
|
To enter rate per unit of the
product
|
|
txtAmount
|
To display the total amount as
quantity rate
|
|
txtDiscount
|
To display the discount amount
based on membership type
|
|
txtNet
|
To display net amount as amount
– discount
|
|
Option Buttons
|
optPlatinum
|
To specify Platinum Membership
|
|
optGold
|
To specify Gold Membership
|
|
optSilver
|
To specify Silver Membership
|
|
Command Buttons
|
cmdCalculate
|
To calculate the amount,discount
and net amount
|
|
cmdExit
|
To close the application
|
i) Write the command to
disable the textboxes txtAmount, txtDiscount & txtNet[1]
(ii) Write the command to remove the
decimal part from the text box txtNet so that
the net amount contains only the integer
portion in Rupees. [2]
iii) Write the code for
cmdCalculate the amount, discount and net amount as per the
given descriptions and conditions. [3]
iv) Write the code for
cmdExit to close the application, but before the application
is closed it should check the net amount and if the net
amount > 10000 the membership of the customer should be
displayed. For example, if the customer already has Silver
membership it should be upgraded to Gold and he should be
informed of the same using a message box. [4]
Q5. Answer the following questions:
i) Write VB procedure which
takes a string as argument and display the following:
· The string in uppercase.
· The length of string.
· The string with its first
and last characters in uppercase and all the other
characters in lowercase. [3]
ii) Write a function in VB
to find sum of the following series:
1 + 1/2! + 1/3! + 1/4! + . . . n terms
Hint: Here ‘!’ stands for factorial.
[3]
iii) Find the output
of the following code segment:
Private Sub cmdOk_click()
Dim V1 as Integer, V2 as Integer,
Counter as Integer
Counter =1
V1=0
V2=1
Do While Counter <= 8
Print V1
Print V2
V1 = V1 + V2
V2 = V2 + V1
Counter = Counter + 2
Loop
End Sub [2]
iv) Find the errors
from the following code segment and rewrite the corrected
code underlining the correction made:
Private Sub ShowGrade (a; b as integer)
c=a + b;
Select Case c
Case 1
Print “Excellent”
Case 2, 3
Print “Good”
Case 4
Print “Average”
Default case
Print “Poor”
End Sub [2]
Section – ‘C’
Q6. Answer the following questions
a) Table: Department
|
DeptNo
|
DName
|
Loc
|
|
1
|
Sales
|
New Delhi
|
|
2
|
Marketing
|
Mumbai
|
|
3
|
Manufacturing
|
Noida
|
|
4
|
R & D
|
Bangalore
|
Look at the above Dept table and give
the output produced by the following PL/SQL code on
execution:
DECLARE
v_DeptID Department.DeptNo%TYPE :=2;
v_Department Department.DName%Type;
v_Counter NUMBER (1) := 1;
BEGIN
LOOP
SELECT DName INTO v_Department FROM
Department WHERE DeptNo = v_DeptID ;
IF V_Department <>3 THEN
DBMS_OUTPUT.PUT_LINE (v_Department);
END IF;
v_DeptID := v_DeptID + 1;
v_Counter : = v_Counter + 1;
EXIT WHEN v_Counter >=3;
END
LOOP
;
END; [2]
(b) Write the output produced by the
following part of code in PL/SQL
BEGIN
FOR i IN REVERSE 1..10
LOOP
IF MOD (i, 2)=0 THEN
DBMS_OUTPUT.PUT (TO_CHAR (i*5)||’
‘);
ELSE
DBMS_OUTPUT.PUT (TO_CHAR (i*10));
DBMS_OUTPUT.NEW_LINE;
END IF;
END
LOOP
;
END; [2]
c) Write a PL/SQL
Stored Procedure that takes “maxrows” and “maxcols”
as argument to generate a multiplication table, using <
> nested simple loop.
The output will be like this:
0 2 3 4 5
2 0 6 8 10
3 6 0 12 15
4 8 12 0 20
5 10 15 20 0 [3]
d) Write a PL/SQL Function
that takes emp_id as argument to determine whether the
salary(field sal) of emp_id 5001 in EMPL table is less than
15000/- Rs. or not. If it is, give the employee an increment
of 25% and return the message “Increment Given”
otherwise return the message “No increment given”. [3]
Q7. Use the following structure of
Customer table to answer the following questions:
|
Column Name
|
Cust_ID
(Primary Key)
|
Cust_Name
|
Cust_Add1
|
Cust_Add2
|
Cust_Phone_
Service_Provider
|
Cust_Phone
|
|
Data Type
|
NUMBER
|
VARCHAR2
|
VARCHAR2
|
VARCHAR2
|
VARCHAR2
|
VARCHAR2
|
|
Length
|
7
|
30
|
20
|
30
|
10
|
10
|
(a) Write a PL/SQL code to modify the
CUST_PHONE numbers by joining ‘2’ if
Cust_Phone_Service_Provider is BSNL, ‘3’ if
Cust_Phone_Service_Provider is RELIANCE, ‘4’ if
Cust_Phone_Service_Provider is AIRTEL, ‘5’ if
Cust_Phone_Service_Provider is TATA and nothing as default.
[4]
(b) Write a PL/SQL code to modify all
the CUST_PHONE numbers by removing ‘2’ if it starts with
‘2’. [2]
(c) Write PL/SQL code to create two
Statement level Triggers TrigBeforeUpdateCustomer and
TrigAfterUpdateCustomer before and after UPDATE statement
respectively on the table Customer which signals ‘Starting
Update’ to signify that modification of records has
started and ‘End of Update’ message to signify that
modification is over. [4]
|
|
|