Page 322 - IT-802_class_12
P. 322
Q 18. (a) Rina wants to display the details of employee whose name starts from s. Find errors in given MySQL command
and write the correct statement.
select* from employee where name like *s; 1+2
(b) Classify them into DDL or DML commands
Update, delete, create, alter
Q 19. Explain the application of Database management systems in banking. 3
Answer any 3 out of the given 5 questions. (4 × 3 = 12 marks)
Q 20. (a) Write a single line Java code using String methods to perform the following tasks
String cl = ‘‘class xii’’;
i. Convert the characters to capital letters. ii. Find the total length of string.
iii. Add a word ‘‘toppers” at the end of original string. 1+1+1+1
(b) What is the purpose of a constructor?
Q 21. (a) Name two e-commerce websites. 1+1+1+1
(b) Creating a strong password is vital. A strong password has:
i. 6-8 Alphanumeric characters ii. Special symbols
iii. Only numbers iv. Both a and b
(c) What are the challenges in online learning?
Q 22. (a) Name the user defined method in the code given below. Also predict the output 2+2
static int mymethod(int x)
{ return ( 5 + x); }
public static void main(String[] args) {
System.out.println(mymethod(3)); }
(b) Explain any two access modifiers.
Q 23. (a) What is an exception? 1+3
(b) Explain each of the following terms in exception handling
i. try ii. catch iii. finally
Q 24. Consider the following tables and write Mysql Commands 4
STORE
StoreId StoreName Location NoOfEmployee OpeningYear OwnerId
S101 Libas Delhi 45 2007 A145
S102 Life Style Mumbai 68 2000 B178
S103 Vogue Mumbai 50 1999 B178
OWNER
Owner Id Owner Name
A145 Divyam Prakash
B178 Neha Sultan
D112 Gargi Chhabra
(a) To display the number of employees present in each location.
(b) To display Stores names, Location and Date of Opening of stores that were opened before 2015.
(c) To add a new column SALE of integer type.
(d) To display Store Name and Owner Name of all stores in Mumbai.
320 Touchpad Information Technology-XII
320

