Вы находитесь на странице: 1из 10

Pre-Board 2014-15

CLASS – XII
SUBJECT : INFORMATICS PRACTICES (065)

Time Allowed : 3 Hrs. Max


Marks: 70
Blue Print
Topic/Unit SA(1) SA(2) LA(6) TOTAL

Networking and open standard 4(4) 3(6) - 7(10)

Introduction to Programming 8(8) 4(8) 2(12) 15(28)

Relational Database Management System 9(9) 6(12) 1(6) 18(27)

IT APPLICATION 1(1) 2(4) 3(5)


KENDRIYA VIDYALAYA, ITI, MANKAPUR
PRE BOARD 2014-15
CLASS-XII
INFORMATICS PRACTICES(065)
Time-3 hours M. Marks-70
Note.
1. All questions are compulsory.
2. Answer the question after carefully reading the text.
3. Programming language: JAVA, HTML,SQL.

1. Answer the following questions:


a) Name the protocol used for sending and receiving e-mails. [1]
b) An organization is planning to link its sale counter situated in various parts of the same city, which
type of network out of LAN, MAN or WAN will be formed? [1]
c) Arrange the following communication channels in ascending order of their data transmission rates.
Ethernet Cable, Optical Fiber, Telephone Cable, Co-axial Cable [1]
d) Which of the following software’s are open source: [1]
Linux, MS Windows 7, Photoshop, My Sql
e) Compare and Contrast between Freeware and Free software. [2]
f) What do the following protocols do? (i) HTTP (ii) FTP [2]
g) Write the two advantages and two disadvantages of the following topologies in network
(i) Bus Topology (ii) Star Topology [2]
2. Answer the following questions:
a) A label by default allows only one line of text to be displayed. Can you display multiple lines of
text in a label? If so, how? [1]
b) Which java method would you use for setting the password character as ‘$’ ? [1]

c) Write the HTML tags to define a Password box. [1]


d) What is wrong with following coding? [1]
<UL type =”a” start=4>
e) Compare HTML and XML briefly. [1]
f) Expand the following : (i) CSS (ii) DTD [1]
g) How can you load the drivers? [1]

3. Answer the following questions:


a) Naved wants to list the names of all the tables in his database namely STATUS. What [1]
command (s) should he write at MYSQL prompt to get this result ?
b) Bank accountant needs to change the last name of one of his customer in table CUSTOMER.
Which command should be used for this? [1]
c) swati needs to display name of those students who have “A” as the second character in their
name. She writes the following SQL query: [1]
select name
from STUD
where name LIKE ‘*A%’;
but the query is not producing the result. Identify the problem.
d) What is the difference between Primary key constraint and Unique constraint? [2]
e) A table SERVICES in a database has 9 columns but no rows. 15 new rows are inserted in the
table and 6 rows get deleted. What is the degree and cardinality of this table?
[1]
f) What are the similarities and differences between Natural join and Equi join? [2]
g) What do you mean by Rollback command in database transaction? [1]

4. Answer the following questions:


a) What do you mean by method overloading and method overriding, with an example.? [2]
b) What will be the value of jTextField1 after execution of following code: [1]
jTextField1.setText(“Information”.reverse());
c) What is the difference between Abstract class and Interface ? [2]
d) What is the difference between String and StringBuffer class ? and name two methods for
each class ? [2]
e) The following code has some error(s). Rewrite the correct code underlining all the corrections
made: int a, b=20; [2]
DO
{ a=b*2;
b=a/b;
}While(b>40)
f) The Milton Casting Company has developed an application to calculate the
wage of its workers. The following functionalities are expected. The Wage rate
are Rs.150/- (per day) for male and Rs.130/- for females. An additional
amount Rs.50/- per day is paid if worker is skilled. [6]

Write the java code for the following questions:


1) Write a method to Calculate total wage, which takes input as number of days and
return the total wage. And also write the code to call the method in button
ActionedPerformed Event.
2) Write the code for clear button.When Clear Button is clicked, all the text boxes get
cleared and Male option isselected.
3) Write the code to reverse the name and show it in message dialog. [6]

5. Answer the following questions:

a) What is the purpose of DROP TABLE command in SQL? How is it different from DELETE
command? [2]
b) Write the SQL command for (i) to (iv) and write the output of the (v) on the basis of the table
SUPPLIER:
Table:SUPPLIER
SNo PName SName Qty Price City
S1 Bread Britannia 150 8.00 Delhi
S2 Cake Britannia 250 20.00 Mumbai
S3 Coffee Nascafe 170 45.00 Mumbai
S4 Chocolate amul 380 10.00 Delhi
S5 Sauce kissan 470 36.00 Jaipur

(i) Display details for all products whose quantity is between 170 and 370.
[1]
(ii) Display data for all products sorted by their quantity.
[1]
(iii) Find all the products that have no supplier.
[1]
(iv) Give SName for that entire product whose name starts with “C”. [1]
(v) Give the output of the following SQL commands:
[2]
(a) Select AVG(Price) from SUPPLIER where price <30;
(b) Select MAX(Price) from SUPPLIER where price >30;
(c) Select COUNT(*) from SUPPLIER Group By City;

6. Answer the following questions:


a) Write an SQl command for creating a table EMPLOYEE whose structures given below: [2]

Field name Datatype Size Constraint


EmpId Number 6 Primary key
EmpName varchar 20 Not null
EmpAddress varchar 30
EmpSal Number 9,2 >5000
DeptId Varchar 2 Foreign key References Dept_Id of
DEPARTMENT Table
b) Given two tables as shown here. [2]
Employee2 Employer
Empno(PK salary
) Id(PK) Employee_no(FK)
100 200.85 51 100
200 129.54 52 100
300 98.17
53 200
54 300
Write commands to create them with constraints. Delete on a primary key should be cascaded
to its foreign keys.

c) Consider the tables PURCHASE and CUSTOMERS given below: [6]

CUSTOMER PURCHASE
Cust_ID Date PurchaseAmount
Cust_I First_Name Last_Nam DOB 3 11/09/2010 200
d e 1 14/10/2010 199
1 Alisha Madan 20/01/1989 2 21/09/2010 600
2 Akhil Sachdeva 01/02/1990 1 01/09/2010 99
3 Rajesh Mehta 10/09/1986 4 23/11/2010 300
4 Rani Garg 24/11/1986

With reference to these tables, write commands in SQL for (i) and (ii) and output for (iii)
(i) Display the first name, last name and purchase amount of all the customers.
(ii) Display the names of all customers whose purchase amount is more than Rs. 200
(iii) SELECT CUSTOMERS.First_Name, CUSTOMERS.Last_Name,
PURCHASE.Date
FROM CUSTOMER JOIN PURCHASE
ON CUSTOMER.Cust_Id=PURCHASE.Cust_Id
ORDER BY Date;
7.
a) What is front end? What is its significance? [2]
b) Identify the various types of relationships from the following and also show them
diagrammatically. [1]
(i) A student enrolls for various courses in a college.
.
c) What controls would you suggest for following types of inputs? [2]
(i) To display some information.
(ii) Enter password.
(iii) To choose more than one subject from a set of subjects.
(iv) To enter multiline text.
KENDRIYA VIDYALAYA, ITI, MANKAPUR
Pre-Board 2014-15
CLASS – XII
SUBJECT : INFORMATICS PRACTICES (065)
Marking Scheme
Q1.
a) SMTP (Simple Mail Transfer Protocol) [1 Marks for correct Answer]
b) MAN [1 Marks for correct Answer]
c) Telephone Cable ,Ethernet Cable, Co-axial Cable, Optical Fiber [1 Marks for correct Answer]
d) Linux,MySql [1 Marks for correct Answer]
e) Freeware (from "free" and "software") is computer software that is available for use at no cost (or
for an optional fee).Though the definition of "freeware" covers both proprietary and closed
source software that is available for use at no cost as well as free and open source software, in common
usage it tends to refer more often to proprietary and closed source software that is available for use at
no cost. Software that is commercial but not available free of charge is occasionally referred to as
"payware" or commercial software.
Free Soft Ware:
Free software, software libre or libre software is software that can be used, studied, and modified
without restriction, and which can be copied and redistributed in modified or unmodified form either
without restriction, or with minimal restrictions only to ensure that further recipients can also do these
things and that manufacturers of consumer-facing hardware allow user modifications to their hardware.
Free software is generally available without charge, but can have a fee, such as in the form of charging
for CDs or other distribution medium among other ways.
[1 Marks for each correct Answer]
f)
(i) HTTP: The Hypertext Transfer Protocol (HTTP) is a networking protocol for distributed,
collaborative, hypermedia information systems. HTTP is the foundation of data communication for
the World Wide Web.
(ii)FTP The Hypertext Transfer Protocol (HTTP) is a networking protocol for distributed,
collaborative, hypermedia information systems. HTTP is the foundation of data communication for
the World Wide Web.

[1 Marks for each correct Answer]


g)
i) BUS Topology:
1. Difficult to administer/troubleshoot.
2. Limited cable length and number of stations.
3. If there is a problem with the cable, the entire network goes down.
4. Maintenance costs may be higher in the long run.
5. Performance degrades as additional computers are added or on heavy traffic.
6. Proper termination is required.(loop must be in closed path).
7. If many computers are attached, the amount of data flowing causes the network to slow down.
8. Significant Capacitive Load (each bus transaction must be able to stretch to most distant link).
ii) Star Topology:
More cabling is required in a star than in other topologies (except mesh).
Entire network collapse if central controller fails. [1 Marks for each correct Answer]

Q2
a) Yes, Using <Br> in HTML in the text proprerty of label. [1 Marks for correct Answer]
b)The java method would you use for setting the password character as ‘$’ is setEchoChar( ).[1 Marks for each
correct Answer]
c)<INPUT TYPE= “PASSWORD” NAME= PWD> [1 Marks for each correct Answer]
d) <OL type =”a” start=4> Type and start attributes are not used in UL tag. [1 Marks for each correct Answer]
e)1.HTML is presentaton language where as XML is not either a programing language or a presentation
language. It is used to transfer data between applications and databases.
2 .HTML is not case-sensitive where as XML is case-sensitive.
3 .In XML we can define our own tags as it is not possible in HTML.
4. In XML it is mandatory to close each and every tag where as in HTML it is not required.
5. XML describes the data where as HTML only defines the data. [1 Marks for correct answer]
(f) CSS: Cascading Style Sheet
DTD: Document Type Definition [1/2 Marks for correct abbreviation ]
g) import java.sql.*;
Class.forName(“con.mysql.jdbc.Driver”); [1 marks for correct answer]

Q3.
a) Use database STATUS;
Show tables; [1 marks for correct answer]

b) update customer set lastname=’xyz’; [1 marks for correct answer]

c) select name from STUD


where name LIKE ‘_A%’; [1 marks for correct answer]

d) The the difference between Primary key constraint and Unique constraint is that we can store null
values in unique constraint but not in the case of primary key.In any table there is only one primary
key but many unique constraints can be present. [1 marks for correct answer]

e) Degree =6, Cardinality=9 [1 marks for correct answer]

f) In Equi join between two tables on the basis of equality join condition
Natural Join: In Natural join between two tables on the basis of equality join condition but the joining
column comes in the resultant table once.
g) Rollback is used undo all the changes applied on the database and send the database to previous
commit or save point status.

Q4.
(a) method overloading is the primary way polymorphism is implemented in Java
Overloading methods
overloaded methods:
 appear in the same class or a subclass
 have the same name but,
 have different parameter lists, and,
 can have different return types
an example of an overloaded method is print() in the java.io.PrintStream class
public void print(boolean b)
public void print(char c)
public void print(char[] s)
public void print(float f)
public void print(double d)
public void print(int i)
public void print(long l)
public void print(Object obj)
public void print(String s)
 the actual method called depends on the object being passed to the method
 Java uses late-binding to support polymorphism; which means the decision as to which of the many
methods should be used is deferred until runtime
Overriding methods
 late-binding also supports overriding
 overriding allows a subclass to re-define a method it inherits from it's superclass
 overriding methods:
 appear in subclasses
 have the same name as a superclass method
 have the same parameter list as a superclass method
 have the same return type as as a superclass method
 the access modifier for the overriding method may not be more restrictive than the access
modifier of the superclass method
class LB_1 {
public String retValue(String s) {
return "In LB_1 with " + s;
}}
class LB_2 extends LB_1 {
public String retValue(String s) {
return "In LB_2 with " + s;
}}
if you create an LB_2 object and assign it to an LB_1 object reference, it will compile ok
at runtime, if you invoke the retValue(String s) method on the LB_1 reference, the LB_2 retValue(String s)
method is used, not the LB_1 method
LB_2 lb2 = new LB_2();
LB_1 lb3 = lb2; // compiles ok
System.out.println(lb3.retValue("Today"));
Output:
In LB_2 with Today [1 Marks for each correct definition]
(b) noitamrofnI
(c) An Abstract Class can contain default Implementation where as an Interface should not
contain any implementation at all. An Interface should contain only definitions but no
implementation. where as an abstract class can contain abstract and non-abstract methods.
When a class inherits from an abstract the derived class must implement all the abstract
methods declared in the base class. an abstract class can inherit from another non-abstract
class.
(d) the most important difference between String and StringBuffer/StringBuilder in java is
that String object is immutable whereas StringBuffer/StringBuilder objects are mutable.
By immutable, we mean that the value stored in the String object cannot be changed. Then the next
question that comes to our mind is “If String is immutable then how am I able to change the contents of
the object whenever I wish to?” . Well, to be precise it’s not the same String object that reflects the
changes you do. Internally a new String object is created to do the changes.
So suppose you declare a String object:
String myString = “Hello”;
Next, you want to append “Guest” to the same String. What do you do?
myString = myString + ” Guest”;
When you print the contents of myString the output will be “Hello Guest”. Although we made use of
the same object(myString), internally a new object was created in the process. So, if you were to do
some string operation involving an append or trim or some other method call to modify your string
object, you would really be creating those many new objects of class String.

Two methods of String Class


(i) equals();
(ii) length()
Two methods of String Buffer Class
(i) append()
(ii) charAt()
[1 Marks for each correct definition]

e)
it is a.
it is b.
it is c.
Ans
f) int a, b=20;
do
{ a=b*2;
b=a/b;
}while(b>40); [1 Marks for each correcting error]
g)
1 public int Calculate(int noday)
{
int noofday=0,total=0;
noofday=noday;
int wage;
if(jRadioButton1.isSelected())
{
wage=150;
}
else
wage=130;
if(jCheckBox1.isSelected())
{
wage=wage+50;
}

wage=wage*noofday;
return wage;
}
2. private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {
jTextField1.setText("");
jTextField2.setText("");
jTextField3.setText("");
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
jCheckBox1.setSelected(false);
}
3.
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
int w;
w=Calculate(Integer.parseInt(jTextField2.getText()));
jTextField3.setText("" + w);
StringBuffer s=new StringBuffer(jTextField1.getText());
s.reverse();

JOptionPane.showMessageDialog(null,s );
}
Q5.
(a) The drop table command destroys the table i.e. data and structure of the table both are deleted. Where
as in delete command the only data is deleted from the table. [1 Marks for writing correct differnce]
1. SELECT * FROM SUPPLIERS WHERE Qty BETWEEN 170 AND 370;
2. SELECT * FROM SUPPLIERS ORDER BY Qty;
3. SELECT Pname FROM SUPPLIERS WHERE SName IS NULL;
4. SELECT SName FROM SUPPLIERS WHERE PName LIKE ‘C%’;
5.
i. 12.66 [1/2 Marks]
ii. 45.00 [1/2 Marks]
iii. 2 [1Marks]
1
2
6. asa
Q6.
(a) create table EMPLOYEE(EmpId number(6) Primary Key,
EmpName Varchar(20) NOT NULL,
EmpAddress varchar(30),
EmpSal Number(9,2) Check EmpSal>5000,
DeptId varchar(2),
Forign Key(DeptId) references DEPARTMENT(Dept_Id));
(b) create table Employee2
(Empno integer(3) primary key
salary double (6,2));
create table Employer
(id integer (3) primary key,
Employeeno(2) integer ,
Foreignkey(Employeeno) refrences Employee2(Empno) on delete cascade);
(c) i) select First_Name, Last_Name, Purchase_Amount from Customer, Purchase where Customer.CustId
= Purchase. Cust_Id;

ii) select First_Name, Last_Name from Customer, Purchase where


Customer.CustId = Purchase. Cust_Id , Purchase.sPurchaseAmount>200 ;
iii)
Alisha Madan 01/09/2010
Rajesh Mehta 11/09/2010
Akhil Sachdeva 21/09/2010
[2 Marks for each correct answer] Alisha Madan 14/10/2010
Rani Garg 23/11/2010
Q7.
a. The front end is responsible for collecting input in various forms from the user and
processing it to conform to a specification the back end can use. The front end is an
interface between the user and the back end.
b.

Student School

d) The controls that are ou suggest for following types of inputs?


(i) To display some information. Label
(ii) Enter password. Password Field
(iii) To choose more than one subject from a set of subjects. Check Box
(iv) To enter multiline text. Text Area
[1/2 Marks for each correct answer]

Вам также может понравиться