12 2006 Informatics Practices 1
12 2006 Informatics Practices 1
General Instructions :
SECTION - A
SECTION – B
Q. 4. Read the following case study and answer the questions that follows:
The Pizza Cafe has computerized its billing. The following is the data entry screen used at their
outlet. The outlet offers two different types of pizzas, regular and pan pizzas. The price of a regular
pizza is Rs. 90 and that of a pan pizza Rs. 110. The user can choose to have three different types of
extra toppings if he wants. Each extra toppings costs Rs. 20.
i. Write the commands to disable the textboxes txtKate, txt’l’opping, txtAmount and
cmdAmount. 2
ii. Write the code for cmdRate to calculate the rate of the pizza and display it in txtRate
depending on the type of pizza selected by the customer. It should also enable the
cmdAmount button. 4
iii. Write the code for cmdAmount to calculate the total amount and display it in txtAmount. The
total amount is calculated by first finding the cost of extra toppings selected by the customer.
Remember that each extra topping costs Rs. 20 therefore if the user selects 2 toppings the
cost of the toppings will be Rs. 40. Then add it to the rate and multiply the resultant amount
by the quantity ordered. 4
i. Find the errors from the following code segment and rewrite the corrected code underlining
the correction made. 2
Dim num=10, las Integer
I=I
Do While 1 < 5
1=1+2
If num > 15
num = 0
Else
num = num — 3
Endlf
End While
ii. Give output of the following statements: 2
(a) INSTR (LTRIM (“INTERNATIONAL”), “na”)
(b) INT (4 - 7 * 3/2 + 5)
iii. Change the following code using FOR loop without effecting the output 2
Dim count, and
ans = 1
count = 20
DO
ans = ans * count
count = count -2
LOOP UNTIL count < = 10
Print ans
iv. Write a Visual Basic procedure which takes a number as argument and dis plays whether it is
prime or not. A prime number is one, which is not divisible by any number other than by 1
and by itself. 4
SECTION - C
Table : CLUB
i. Write the SQL command to create the table Club including the constraints. 2
ii. Write the SQL command to display the details of the all the members whose type is
“Permanent” and fees is more than Rs. 1000. 2
iii. Write a Pl/SQL code to increase the fees by 5% for a member number accepted from the use if
the type of the membership is “Temporary”. 3
iv. Write Pl/SQL code using and explicit cursor to display the details of all the “permanent”
members whose age is greater than 50. The code should also display the average membership
fees of all such members. 3