Professional Documents
Culture Documents
CBSE Class 11 Informatics Practices Sample Paper-03 (Solved)
CBSE Class 11 Informatics Practices Sample Paper-03 (Solved)
MM:70
Time : 3 hours
General Instructions : i) All questions are compulsory. ii) Answer the questions after carefully reading the text. iii) Please check that this question paper contains 7 questions. iv) Do all the parts of same questions together.
(c) Give one point of difference between OCR and OMR. (d) What is a port ? Name any two port types. (e) Write any one advantage of TFT display. (f) What do you understand by Computer Security ? Name any two threats to computer security. (g) Why IDE are useful in application development.
1 2 1 2
Q2. (a) What is the role of JVM in platform independence in Java. (b) Give the syntax and example of declaring variable. (c) Give any two properties of TextField control in java. (d) Differentiate between the following : (i) if and switch (ii) runtime errors and logical errors 1x2 2 1 1 1x2
(e) What will be the value of following expressions if j=5, (1) (5*++j)%6 (2) (5*j++)%6
Q3. (a) What is SQL ? What are the different categories of SQL commands. (b) Name all the integrity constraints used during table creation. (c) Describe the following commands with syntax and example: (i) insert command (ii) update command
2 1
2 2
(e) When a column value is skipped in an insert command , which value is inserted 1 in the table. (d) A table has 5 columns and 10 rows. What is its degree and cardinality. (e) Give one point of difference between the primary key and foreign key. 1 1
Q4. (a) Write a program in java to calculate the sum of all the no. divisible by 5 in the range 1 to 50. (b) Write the output of the following code: int i=0,x=0; do{ if(i%5==0){ x++; System.out.println(x + \n); } ++i; }while(i<20); System.out.println(x); (c) Rewrite the following while loop into a for loop: int s=0; while(s<=13){ if(s%2==2) 2 2 2
(d) Rewrite the corrected program after removing errors, underline the corrections: Int I=5,J=10; if (I<J)||(I=10)) System.out.println(OK \n); System.out.println(Not OK);
(e) Design the following application and answer the questions that follow :
(c) Write the code for the Clear button to clear all the textfields (txtPrincipal & txtTime) 2 and checkbox. Set the default choice in the radio button as Fixed Deposit. Suppose the name of radio button Fixed Deposit is radioFD and Recurring Deposit is radioRD.
(d) Write the code for the calculate button to calculate compound interest (P*(1+R/100)^T) and amount ( Principal + Compound Interest) and display the values in the txtInterest and txtAmount depending on principal, rate and time.
Recurring Deposit
An additional rate of 2% is given to the senior citizens i.e. if the chkSR checkbox is checked.
Q5. (a) (i) Write an SQL query to create table bank with the following structure : 2
(b) Write an SQL query to create table transaction with the following structure :
Field AccountNo
Type Integer
Constraint Foreign Key related to the AccountNo of bank table Not Null Must be >0
(i) select concat(Lcase(To be),trim(Trailing . From continued)) ; (ii) select round(15.193,1)+truncate(2.24,1); (iii) select len(trim(Ajay#Jain###)) (# means blank space) (# means blank space)
(d) What is the difference between DELETE and DROP commands of SQL. (e) What is a constraint.
1 1
Q6. (a) There is a table T1 with combination of columns C1, C2, and C3 as its primary key? Is 2 it possible to enter: a. NULL values in any of these columns? b. Duplicate values in any of these columns? (b) Consider the following employee table and write the output of the following SQL queries: EmpNo 101 102 103 104 105 Name Reena Shankar Meena Payal Rony Job President Manager Manager Clerk Manager Gender F M F F M Salary 30000 18000 15000 5000 23000 DeptNo 10 10 20 30 20 Commission 300 400 300 100 500 4
(i) Display the name of those employees whose name contains ee. (ii) Display the name, salary and deptno of those employees whose salary is in the range 10000 and 30000. Order the query output in ascending order of name. (iii) Display all the details of Female Manager and President having salary >10000. (iv) Double the commission of those employees working in deptno 20 and 30.
(c ) Consider the above table and perform the following: (i) In the employee table add a column mobileno. of datatype number with maximum of 10 digits with default value of 0000. (ii) Display the names of employees having exactly four lettered names. (iii) Add a primary key constraint EmpNo in the employee table. (iv) Remove the column Gender.
Q7. (a) Name any two e-governance websites of India. (b) How has e-learning benefited the students. (c) Describe any two positive impacts of e-business. 1 2 2
(1
(b) Operating System is a program which act as an interface between a user ( 1 marks) and the hardware(i.e. all computer resources). Example : Windows & Unix (c) Any one difference between OCR and OMR. (d) Ports are the points on computer having associated circuitry to allow connection of external devices with computer. ( + marks) ( 1 mark) ( 1 mark)
( + marks)
(e) Use less power than a normal monitor and can display text and graphics ( 1 mark) in a wide range of colours.
(f) Computer Security: It is the ability of a system to protect information and system resources with respect to confidentiality and integrity . Viruses and spyware ( 1 mark) ( + marks) (1
(g) It is a software tool to help programmer to edit, compile, interpret and debug the marks) program in the same environment.
Q2. (a) JVM is an abstract machine designed to implemented on the top of existing processors. It hides the underlying operating system . (b) datatype <variable_name>; (1/2 mark) int a; (c) text and name (any two properties)
(2 marks)
(d) (i) if can evaluate a relational or logical expression whereas switch can test for equality (ii) Runtime errors occurs at run time whereas in case the application is not giving any compilation or runtime error but still giving a incorrect output, it is logical errors. (e) (i) 0 ( 1 mark) (ii) 1 ( 1 mark) ( 1 mark) (2 mark) ( 1 mark)
Q3. (a) SQL: In order to access data within the database, all programs and user (1 mark) must use , SQL . It is the set of commands that is recognized by nearly all RDBMS. DDL , DML, TCL Session Control and System control commands. (b) Primary Key, Not Null, Foreign Key, Check, Default, Unique (c) (i) insert command is used ti insert new record into the table. The syntax is Insert into tablename values(exp-1,exp-2,exp-3..); Insert into emp values(101,seema,president.); ( + marks) (1 mark) (1 mark) (1 mark) (1 mark)
(ii) update command is used to change some or all of the values in an existing row. The syntax is Update <table_name> set colname-newvalue, Where <search_condition>; Exp: update item set itemname=key where itemno=1;
(e) primary key is used ti uniquely identify the tuples of a table whereas
Q4. (a)
(2 marks)
(b) Output is 1 2 3 4 4
(2 marks)
(c) for(int s=0;s<=13;++s){ if(s%2==2) { System.out.println(Color is red); } else {System.out.println(Color id blue); } System.out.println(New color); }
(2 marks)
(d) Rewrite the corrected program after removing errors, underline the corrections: int I=5,J=10; (1/2 mark)
(e) (a) txtPrincipal.setText( ); mark) txtTime.setText( ); mark) chkSR.setSelected(false); mark) radioFD.setSelected(true); mark) (1/2 (1/2 (1/2
(1/2
(b) float P= Float.ParseFloat(txtPrincipal.getText()); float T= Float.ParseFloat(txtTime.getText()); if(radioFD.isSelected()==true) { if(T<=1) R=10; elseif(T>1 && T<=5) R=12; elseif(T>5) R=15; } else { if(T<=2) R=11; elseif(T>2 && T<=7)
(4 marks)
Create table bank( AccountNo Integer Primary Key, mark) CustName varchar(20) Not Null, mark) Address varchar(30), ContactNo varchar(10) Not Null, mark) Balance Decimal check(Salary>=1000) mark) );
(1/2
(1/2
(1/2
(1/2
Create table transaction( AccountNo Integer references bank(AccountNo), Trans_date varchar(10) Not Null, Trans_type varchar(20), Amount Decimal check(Amount>0) );
Field AccountNo
Type Integer
Constraint Foreign Key related to the AccountNo of bank table Not Null Must be >0 4
Varchar(10) Varchar(20)
1 mark
Delete is used to delete rows from a table while DROP is used to remove the entire table from the database. (e) A constraints is a condition or check application on a field or set of fields.. 1 mark
Q6. (a) a. it is not possible to enter NULL values in any of these columns. 1 mark b. While it is possible to enter duplicate values in these columns but the combination 1 mark of C1,C2,C3 should be unique.
(b) (i) select Name from employee where Name like %ee%; (ii) select Name, Salary, DeptNo from employee where Salary between 10000 and 30000 order by Name; (iii) select * from employee where Gender =F and Job in (Manager,President) and salary >10000; (iv) update employee set Commission=2*Commission Where Deptno in (20,30); 1 mark 1 mark 1 mark 1 mark
(c ) (i) alter table employee add (mobileno Integer default 0000); (ii) select Names from employee where Name like _ _ _ _; (iii) alter table employee add constraint pk primary key EmpNo (iv) alter table employee drop column Gender. 1 mark 1 mark 1 mark 1 mark.
Q7. (a) (i) www.incometaxindia.gov.in (ii) www.india.gov.in (b) (1) availability of same course to millions. (2) boon for working class. (c) (1) Offers opportunity to access new markets across the globe. (2) Provides convenience and comfort for customers. (2 marks) (1 mark) (2 marks)