0% found this document useful (0 votes)
84 views7 pages

Sample Paper: 2013 Class: XII Subject: Informatics Practices

This document contains a sample paper for Class 12 Informatics Practices exam with 8 sections covering topics like databases, SQL, Java programming, HTML, and XML. It includes questions related to keys in databases, SQL queries, Java classes and methods, control flow statements, HTML tags, and differences between technologies like XML and CSS. Students are asked to write code snippets, define concepts, and solve other programming and markup language related questions.

Uploaded by

libranhitesh7889
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views7 pages

Sample Paper: 2013 Class: XII Subject: Informatics Practices

This document contains a sample paper for Class 12 Informatics Practices exam with 8 sections covering topics like databases, SQL, Java programming, HTML, and XML. It includes questions related to keys in databases, SQL queries, Java classes and methods, control flow statements, HTML tags, and differences between technologies like XML and CSS. Students are asked to write code snippets, define concepts, and solve other programming and markup language related questions.

Uploaded by

libranhitesh7889
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

http://www.cbseguess.

com/

SAMPLE PAPER : 2013 Class : XII Subject : Informatics Practices Time: 3 hrs. Instructions: All questions are compulsory. Programming language:java Section A a) What is foreign key and Candidate Key? b) [2] M.M. 70

In a student table, out of RollNumber, Name, Address which column can be set as Primary key and Why? [1] [2]

c) What is the purpose of distinct clause? Explain with example.

d) While Creating a table Customer_tbl Meenakshi forget to set the primary key for the table. Give the statement which she should write now to set the column CustID as the primary key of the table? e) Write Difference between DDL and DML commands [1] [2]

f) Write a function in Java that takes principal, rate and time as parameter and returns Simple Interest. [2] Section B

a) Define Inheritance with reference to Object Oriented Programming. b) Design an application having an interface like:

[2] [3]

Implement functionality by writing methods with passing the argument of three textboxes in, clacSum(), calcAvg() & calcMax(). Invoke these methods from buttons event handlers.
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

c) Define a class Book with the following specifications :


Data Members of the Book are : BOOK_NO INTEGER BOOK_TITLE STRING NO_OF_BOOKS INTEGER PRICE FLOAT(PRICE PER COPY) TOTAL_COST() A function to calculate the total cost for number of copies. Member methods of the class book are : INPUT() Function to read No of Books, Book_title, price. The following is the screen used to declare class to calculate total cost :

The list of controls for the above form is as follows : Control Type JTextField Control name Property Value JTextField1 txtBNo JTextField2 txtBName JTextField3 txtPrice JTextField4 txtNo JTextField5 txtTotal JButton1 Calculate price JButton2 Exit Define a class Book with required specification. [2] Write the code for Calculate Price button click event procedure to operate the class Books method [ 1.5] Write the code for Exit Button to exit application. [0.5]

JButton i. ii. iii.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

d) Rewrite the following code using a for loop :


int i=1, sum=0; while (i<10) { sum+=i; i+=2; } Section C

[1]

a) Write SQL Commands for (i) to (v) and write the outputs for (vi) on the basis of table :
[1x10=10] Table : FURNITURE NO ITEM NAME TYPE DATEOFSTOCK PRICE DISCOUNT 1 White Lotus Double Bed 2002-02-23 3000 25 2 Pink feathers Baby Cot 2002-01-29 7000 20 3 Dolphin Baby Cot 2002-02-19 9500 20 4 Decent Office Table 2002-02-01 25000 30 5 Comfort zone Double Bed 2002-02-12 25000 30 6 Donald Baby cot 2002-02-24 6500 15 7 Royal Finish Office Table 2002-02-20 18000 30 8 Royal tiger Sofa 2002-02-22 31000 30 9 Econo sitting Sofa 2001-12-13 9500 25 10 EatinParadise Dinning Table 2002-12-19 11500 25 To show all the information about the Baby cots from the furniture table. To list the itemname which are priced at more than 15000 from the furniture table. To list itemname and type of those items, in which dateofstock is before 2002-02-01 from the furniture table in descending order of itemname. To display itemname and dateofstock of those items, in which the discount percentage is more than 25 from the furniture table. To count the number of items, whose TYPE is Sofa from the furniture table. Give the output of following SQL statement : 1. select count (distinct type) from furniture; 2. Select max(discount) from furniture; 3. Select avg(discount) from furniture where type=Baby Cot; 4. Select sum(price) from furniture where dateofstock < 2002-02-12; 4. Select count (*) from furniture;

i. ii. iii. iv. v. vi.

Section D [1 X5=5] a) SELECT ROUND(20009.111,-2); b) SELECT SQRT(81)+SQRT(49)+SQRT(121); c) SELECT MID(APS Public School ,11,8), TRIM(LEADING ! FROM !!!!!WEL COME!!!!!); d) SELECT SUBSTR( RTRIM(INDIA IS GREAT ),3,9);
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

e) SELECT CONCAT(UPPER (xiHum), LOWER(xiSc), UPPER(SUBSTR(xiCom,2,3))); Section E a) Which MySQL command helps you to see existing databases? [1] b) Hemant created a table in Mysql. Later he found that table is wrongly created and he wants to remove it. Name the command by which Hemant can do it. [1] c) Aditi created a table named student, she wants to see those students whose name ending with p. She wrote a querySELECT name.* FROM student WHERE name = %p; Help her to run the query by removing the errors from the query and rewriting it . [2] d) Aadhar is not able to set Empid of EMPL table to NULL. Which constraint has he used while creating table? [1]

Section F a) Create two tables: Customer ( customer_id , name ) Customer_Sales ( transaction_id , amount , customer_id) Underline columns indicate primary keys and customer_id indicates foreign key in customer_sales Table .Make sure that no action should take place in case of a DELETE or UPDATE in the parent table. Name the foreign key constraint as FK_CUST b) In a database there are two tables LOAN and BORROWER as shown below:

[2]

Loan_number L-170 L-230 L-260 LOAN

Branch_name Downtown RedWood Perryridge

Amount 3000 4000 1700


LOAN

Customer_Name Jones Smith Hayes BORROWER

Loan_number L-170 L-230 L-155

c)

i. Identify the foreign key column in the BORROWER table. ii. How many rows columns will be there in the natural join of these two tables. [1] If a database Library exists. Write the command to start working in this database. [1] [2] [1] [1]

[1]

Section G a) Define Method Overloading and method overriding? b) What is the difference between setEnabled and setVisible methods of a control? c) Write the purpose of the following statements. i) jTextField1.setText("Value"+Math.round(-11.5));

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

ii) final double g=9.8; d) Rewrite the following code using if ..else. switch(ch) { case a: case A: case e: case E: case i: case I: case o: case O: case u: case U: ++v;break; default: others++; } e)

[2]

The following code has some error(s). Rewrite the correct code underlining all the corrections made. [1] int i,c,a=5,b=0; for(i=0,i<20,i++) { if b=0 then break; else c=a/b; system.out.show(Quotient+c);

f)

Dream Land Enterprises has computerized its billing. The following data entry screen is used to generate bill.

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

The criteria for calculation of delivery and handling charges is as given belowCategory of City Charges A Class Rs. 3500 B Class Rs. 4000 C Class Rs. 4500 i. Write the code to make the text fileds txtSubTotal, txtTax, txtDelHanCh and txtTotal non editable and set the category of city as C class. [ 2] ii. Write code to do the following1. Write the code for Calculate button to calculate and display Sub Total, Tax, Delivery & Handling Charges and Total depending on the category of the city. [3]

o Sub Total is calculated as Unit Price * Quantity. o Tax is calculated as 7.85% of Sub Total o Total is calculates as the sum of Sub Total, Tax and Delivery and Handling Charges. If Company
Employee check box is checked then tax should be 2.5%. 2. When Clear button is clicked all the text boxes should be clear and Close the application when Exit button is pressed. [1] Section H a) Differentiate between <A> and <B> tag of HTML. [1] b) Write any two features of XML [1] c) Difference between ROWSPAN and COLSPAN attribute. [1] d) Write a function in java that take a number as parameter and return true if number is palindrome otherwise return false. [2]
www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

http://www.cbseguess.com/

e) Compare .XML and .CSS, DOC File in XML. f) What is the wrong in the following coding ?
<HEAD> <MY WEB PAGE> <TITLE> Welcome to my web page </HEAD> </TITLE> g) Write HTML Code to display these Text : CaSO4 (a+b)2=a2+b2+2ab

[1] [1]

[2]

h) Write the html code to display the following controls :

[3]

www.cbseguess.com Other Educational Portals www.icseguess.com | www.ignouguess.com | www.dulife.com | www.magicsense.com | www.niosguess.com | www.iitguess.com

You might also like