INFOPRACREV

download INFOPRACREV

of 14

Transcript of INFOPRACREV

  • 8/3/2019 INFOPRACREV

    1/14

    INFORMATICS PRACTICES REVISION AISSCE 2011-12

    SAMPLE PAPER -11. (a) Name the protocol used for sending and receiving e-mails.

    1(b) Define the following 1

    i. Baud ii. Bps

    (c) Expand them 1

    i. NFS ii. MODEM

    (d) Differentiate between MAC address and IP address.2

    (e) Which of the following are open source LINUX , MS Window Vista , Python , MySQL ,PageMaker. 1

    (f) Write down two merits and two demerits of the following topologies2

    i. STAR ii. Tree

    (g) List down merits of open standards. 1

    2. (a) ABC public school has developed a JAVA application through which the parents are ableto see their

    deposited fee details for their ward. What should school do so that parents / studentsare able to

    view the details shown in text field and cant modify them.

    1(b) What is the used of return statement in method.

    1

    (c) What is the basic structure of HTML file. 1

    (d) Is justified alignment to a paragraph will be assigned in HTML. Justify your answer.1

    (e) Write code in Java to find out enter number is palindrome or not.2

    (f) Write a small code for Exit Control Loop. 2

    (g) Write down some features of XML. 2

    3. (a) MySQL runs on which operating systems. 1

    Page 1 of Pages 12

  • 8/3/2019 INFOPRACREV

    2/14

    (b) Sachin is assigned a assignment to create a table in which field named DOB may or maynot contain

    value. Tell what is the significance of the keyword.1

    (c) What are multirow functions? 1

    (d) What will be the output of following code?1

    i. SELECT UASE ( Redundancy);

    (e) What is SQL? Write down its different categories also? 2(f) The Pincode column of table Post is given below- 2

    i. SELECT Pincode from Post where Pincode LIKE = %1 ;ii. SELECT Pincode from Post where Pincode LIKE = 0 % ;

    (g) A table Animals in a database has 3 columns and 10 records. What is the degree and cardinalityof this table? 2

    4. (a) What will be the contents of jTextField after executing the following statement?

    1jTextField.setText ( B + a )

    (b) Predict the output for tan & tan1 if sac equals 7?2

    int tan = 0, tan1 = 4 ;

    if ( sac == 2 )

    { tan = 4 ; tan1 = 0; }

    else if (sac == 8)

    { tan = 0 ; tan1 = 4; }

    JOptionPane.showMessageDialog ( null , tan = + tan + , tan1 = + tan1 ) ;

    (c) What is constructor. Give example. 2

    Page 2 of Pages 12

    Pincode110001120012300048

    281001

  • 8/3/2019 INFOPRACREV

    3/14

    (d) In JDBC coding, what methods would be opted to move to last record of the recordset recSet? 1(e) Identify the errors and tell the output ( jTF 1 = 20 , jTF2 = 10 ) 2

    (i) int m = integer.getInt(jTFl.getText() + jTFl.getText());(ii) JOptionPane.showMessageDialog(null , + ( m +1 ) ) ;

    (f) Give the output for the following code fragment: 2v = 20 ;do{JOptionPane.showMessageDialog( null , v + ) ;

    } while ( v < 50 ) ;JOptionPane.showMessageDialog( null , Bye ) ;(g) Virus software Hut has developed the following Interface as shown below.

    If Bill amount is > 10,000 than discount is as follow

    PaymentMode

    Discount

    Cost 15 %

    Credit Card N/L

    Cheque 10 %

    i. Write the code to make the TextFields for Discount & Net Amount in editable.1

    Page 3 of Pages 12

    Virus S/w Hut Name of customer

    Bill amount

    O Cash O Credit Card OCheque

    Discount

    Net AmountCalculate Discount

    Stop

  • 8/3/2019 INFOPRACREV

    4/14

    ii. Write code to Calculate Discount button as per given criteria and discountand net 3 amount should be displayed in TextField.

    iii. Write code for Stop button to close the interface. 1

    5. (a) What do you understand by primary key and candidate key.2

    (b) Write the output of following SQL queries.2

    i. SELECT ROUND(6.88,2) ;

    ii. SELECT MID(Discovery Channel,4,6) ;

    iii.SELECT DAYOFMONTH (20110330);iv.SELECT TRUNCATE (7.727,1);

    (c) Consider the table STUDENT given below, write SQL Commands for (i) to (iv) and output for (v) to(viii)

    RollNo

    Name Class DOB Sex

    City Marks

    1 Nanda X 6/6/95 M Agra 5512 Saurabh XII 7/5/93 M Mumbai 4623 Sanal XI 6/5/94 F Delhi 4004 Trisla XII 8/8/95 F Mumbai 4505 Store XII 8/10/95 M Delhi 3696 Marisla XI 12/12/94 F Dubai 2507 Neha X 8/12/95 F Moscow 3778 Nishant X 12/6/95 M Moscow 489

    (i) To Display all information about class XII students. 1(ii) List the name of made student of class X. 1(iii) List names all class of all students in descending order of DOB.

    1(iv) To count the number of student in XII Class of Mumbai city.

    1(v) SELECT DISTINCT(Sex) FROM Student.

    (vi) SELECT AVERAGE(Marks) FROM Student GROUP BY Sex.

    (vii) SELECT COUNT(*)FROM Student where Class = XI

    (viii) SELECT MAX(Marks) FROM Student.

    6. (a) Write an SQL query to create the table books with following structure.2

    Field Type ConstraintsBookID Varchar (5) Primary Key

    BookName Varchar (20)

    Page 4 of Pages 12

  • 8/3/2019 INFOPRACREV

    5/14

    Author Varchar (20)Price Decimal (5, 2)

    (b) Following two tables are shown below are preset in database-BOOK

    EID EbookName Author3 Internal terms Okhla4 RDBMS Steve5 NetBeans Gosling

    COSTSubj ID EID Cost

    E40 1 2000E41 4 1700E42 3 1800E43 5 1250

    i. Identify the foreign key column in the table COST. 2ii. Check every value in EID column of both in table. Do you find any discrepancy.

    2(c) Consider the tables product and client give below Product

    PID ProdName Manufactures PriceT P01 Pen Cello 5T P02 Gel pen Luxar 10T P03 Ink pen Luxar 10T P04 Pencil Natraj 2T P05 Sketch Camel 2

    Client

    CID CliName City PID01 Rakesh Delhi TP0102 Prakash Mumbai TP0503 Suresh Delhi TP0304 Dinesh Delhi TP0205 Pravesh Banglore TP04

    i. To Display the details of products whose Price is in the range of 6 to 102 ( Both value included )

    ii. To display client name, city from table chart and ProdName and price fromtable 2 product.

    iii. To increase the price of all products by 10. ( Product the output only)2

    7. (a) What is front-end? 1(b) Give one societal impact of e-business. 1

    (c) Anu works for a Hotel. Sky warts to create controls on a form for the following function.2

    Page 5 of Pages 12

  • 8/3/2019 INFOPRACREV

    6/14

    Choose appropriate controls from TextField, Label , RadioButton , CheckBox , List ,ComboBox ,

    Button and write in the third column.

    S.No. Controls use to Control1 Select room type2 Enter customers name3 Enter arrival date4 To book rook

    SAMPLE PAPER -2

    1) Answer the following questions:a) What is the difference between Star Topology and Bus Topology of network? 2b) What is the full form of the following 2

    i) FTP ii) FSF iii) GNU iv) FLOSSc) What do you understand by Domain Name resolution? 2d) Why network security is an important aspect over data security 2e) Explain the following terms: 2i) Linux ii) OSS

    2) (a) What is e-Learning? 1(b) What is database connectivity? 1

    (c) You want to develop an interface for entering your Roll_no, Name, Age and Sex (male orfemale).Suggest suitable front-end interface tools in NetBeans IDE. 2

    (d) Differentiate between front-end and back-end. 2

    Section (B)3. (a) What will be the output of the following program code when the user will press JButton: 2

    Public class svm{ int a;

    svm(int p)

    { a=p; }void assign(int no){ a=no; }int disp(){ return a; }

    }private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)

    {svm os=new svm(15);

    Page 6 of Pages 12

  • 8/3/2019 INFOPRACREV

    7/14

    System.out.println( + os.disp());os.assign(35);System.out.println( + os.disp());

    }(b) Rewrite the following if-else segment using switch-case statement 2

    char ch='A';if(ch=='A')

    System.out.println("Account");if((ch=='C') || (ch=='G'))

    System.out.println("Admin");if(ch=='F')System.out.println("Advisor");

    (c) What is Dialog box? 1(d) Explain the Resultset. 2(e) In the Design Area, describe the process of setting, two components to the same width. 2(f) (i) What are the general rules of declare XML element. 2

    (ii) Write HTML code for the following page: 2

    ProductionMr. Ajay 1389Mr. S.N. Krishna 1566Mrs. Arti Singh 1722

    SalesMr. Alok 2244Mrs. Poonam 4533Ms. Anita Sharma 5638

    (g) (i) Write the HTML code line to set the BGCOLOR as YELLOW. 2(ii) What do you understand by option VLINK used with tag?

    Q3. Read the following case study and write a java code to answer the questions that following.Manager of Bachat Bank has developed a java form for finding EMI to be paid by customersagainst repayment of loan.

    Loan interest rates are(Yearly) -

    Loan Type Interest RateCar Loan. 14.5 %Personal Loan 13.25 %Education Loan 11.75 %

    Page 7 of Pages 12

  • 8/3/2019 INFOPRACREV

    8/14

    Name of the various objects in jframe are:Object Type Object Name Description

    JFrame JFrmEmiCalc Main FormCombo Box jcmbYears To select Years for Loan

    Text Box

    jtxtLoanAmt To enter loan amount jtxtProcCharge To enter processing charge jtxtRate To enter interest rate jtxtEMI To display EMI payable

    Option ButtonrbtnCar To select loan type as Car LoanrbtnPersonal To select loan type as Personal LoanrbtnEducation To select loan type as Education Loan

    Command Button jcmdCalcEMI To calculate payable amount jcmdClear To clear the entered values jcmdExit To quit form application

    a) Initially loan type should be set to Car Loan , jtxtRate should be disabled and jcmbYearsshould have values 5,10,15, and 20.

    2

    b) If loan amount is less than or equal to 0. It should display an error message Invalid

    Amount and cursor should point to jtxtLoanAmt. 2c) When the user clicks the CmdCalcEMI button, the total payable EMI should be calculatedand displayed in the jtxtEMI text box. To calculate EMI, firstly calculate compound interestusing formula ci=p*(1+r/100) t. Add compound interest to loan amount and divide by time(in months). 4d) Write the code for jCmdExit button to stop the application and jCmdClear command buttonto clear all the text boxes, option buttons. Also cursor should point on jtxtLoanAmt test box. 2

    (Section C)5. (a) Differentiate between CREATE TABLE and DROP TABLE in SQL. 2

    (b) What do you mean by attribute? Explain with an example. 2

    (c) What is transaction? Which statement is used to disable or enable the transaction. 2(d) What is the difference between Cartesian product and join? 2(e) Name the clauses for the following: 2

    (i) To display the record in specified range.(ii) To display the record according to the given pattern

    1. Write SQL commands for the statements (i) to (vi) and give outputs for SQL queries (vii) to (x)on the basis of the table Shop. 10

    Table: Shop

    Page 8 of Pages 12

  • 8/3/2019 INFOPRACREV

    9/14

    No. Shop_name Sale Area Cust_percent Rating City1 West side 250000 West 68.6 C Delhi2 Pantaloons 500000 South 81.8 A Chennai3 Sirs & Hers 300000 North 79.8 B Amritsar 4 Sports king 380000 North 88.0 B Baroda5 Biswas stores 456000 East 92.0 A Delhi6 Big Bazar 290000 South 66.7 A Kolkota

    (i) To display the name of all shops which are in Area South and sale more than average sales.

    (ii) To display name and Customer Percentage of all the shops having cust_percentage between77 and 90.

    (iii)To display list of all the shops with minimum sales, in ascending order of shop name.(iv) To display the city along with sum of sale for each city.(v) To display all the columns where rating is A in the descending order of area;(vi) To display all the Area where more than one shop is there.(vii) Select min(sale) from SHOP where Sale>300000 Group by Sales;(viii) Select Count(Distinct City ) from Shop;(ix) Select Avg(Sale) from Shop where Area=South;(x) Select Avg(Cust_percentage), sum(sale) from shop where Rating=A;

    2. (a) Write the SQL command to create the TEACHER and DEPARTMENT tables including itsconstraints. 2

    Table : TEACHERColumn Name Data Type Size Constraint

    TNO TNAME TADDRESSSALARYDEPT_NODOJ

    CHARVARCHARVARCHARDOUBLECHARDATE

    420257,24

    PRIMARY KEY

    Table DEPARTMENTColumn Name Data Type Size ConstraintDEPT_NODEPTNAME

    CHARVARCHAR

    410

    PRIMARY KEY

    (b) Write the resulting output of the following: 2(i) SELECT SUBSTR(TRIM( HELLO HOW*******ARE YOU),5,14);(ii) SELECT FLOOR(65467.8890) + R0UND(1234.88, 1);(iii)SELECT MOD(14*9,90/9);(iv) SELECT SUBSTR(UPPER(SUBSTR(God is great,2,8)),2);

    (c) Study the following table TEACHER and SALARY and write the SQL commands forthe questions (i) and (ii) and give outputs for SQL queries (iii) and (iv)

    Table : TEACHERSID NAME DEPT GENDER EXPERIENCE101 Siddharth Computer M 12104 Raghav Physics M 5107 Naman Chemistry M 10114 Nupur Computer F 3

    Page 9 of Pages 12

  • 8/3/2019 INFOPRACREV

    10/14

    109 Janvi Physics F 9105 Rama Accounts M 10117 James Computer F 3111 Binoy Accounts F 12130 Samuel Computer M 15

    Table : SALARYSID BASIC ALLOWANCE DA101 12000 1000 300

    104 23000 2300 500107 32000 4000 500114 12000 5200 1000109 42000 1700 200105 18900 1690 300130 21700 2600 300

    (i) Display NAME and DA of all staff who are in Accounts department and having more than 10years of experience and

    DA is more than 300. 2(ii) Display the NAME and salary of all staff working in physics department and salary more than

    average salary. (SALARY=BASIC +ALLOWANCE+ DA)2

    (iii)Select NAME, DA, BASIC from TEACHER, SALARYWhere BASIC>20000 and TEACHER.SID=SALARY.SID;

    1(iv) Select NAME, DEPT, GENDER, BASIC, DA from TEACHER, SALARY

    Where DEPT LIKE %o% and DA >=500 and TEACHER.SID=SALARY.SID;1

    SAMPLE PAPER -3

    Note: Answer the questions after carefully reading the text.Q 1. Answer the following questions.

    a) A School would like to go in for network of all the computers. Which topology would you

    recommend and why?

    [2]

    b) What is communication channel? What choices do you have while choosing a communication

    channel for a network?

    [2]

    c) What do you mean by network topology? Name most popular topologies [2]d) Navneet is using software, which has been downloaded from internet and is available for one month.

    After one month he has to pay license fee for further use. What software Navneet is using?

    [1]

    e) Akhil is transferring songs from his mobile to his friends mobile via Bluetooth connection. Name

    the network used by Akhil.

    [1]

    f) Which of the following is not a characteristic of open source software?

    Its source code is available for modification

    Its owned by a company or an individual

    It can be downloaded by Internet

    [1]

    g) Which protocol is used for transfer of hyper text documents on the internet? [1]Page 10 of Pages 12

  • 8/3/2019 INFOPRACREV

    11/14

    Q 2. Answer the following questions.a) Ms. Kiran has developed a Java application for a restaurant billing, in which check boxes and textfields are made on form. Items are shown through check boxes. Selecting check box displayingcorresponding text fields. Name the property which Kiran should use to perform the same.

    [1]

    b) What is the purpose of break and continue statement in a loop? [1]c) Name the tag which is used to insert image in background of HTML document with example. [1]d) What is XML? How is it different from HTML? [1]e) What will be the value of s after executing the following code?

    double i,sum=2

    for(i=3;i

  • 8/3/2019 INFOPRACREV

    12/14

    e) The following code has some error(s). Rewrite the correct code underlining all the corrections made.int y=3;switch(y);{ case 1: System.out.print(Yes its One);

    case >2: System.out.println(Yes its more than Two);break;

    case else: System.out.print(Invalid Number):

    [2]

    f) What will be the content of jTextField1 and jTextField2 after executing the following code:String st=New to Information Technology;jTextField1.setText(st.replace(Technology,Practices);

    jTextField2.setText(st.substring(7));

    [2]

    g) Ms. Sheela works in a shopping mall. To calculate net payable amount she has developed thefollowing GUI in NetBeans.

    The shop accepts payments in three modes- Cash, Debit Card, Credit Cards. The discount given as per mode of payment is as follows-

    Mode of payment DiscountCash 12%Debit Card NilCredit Card 8%

    If the Member check box is checked then the customer gets an additional discount of 5% on net payable amount.

    I. Write the code to make the textfields for Discount( txtDiscount ) and Net Payable(txtNetPayable) uneditable.

    II. Write code to do the following-a) When Calculate button is clicked the discount and net payable amount is calculated as

    per the given criteria and displayed in discount and net payable text boxes.b) When Clear button is clicked all the text boxes should be clear.c) Close the application when Exit button is pressed..

    [6]

    Q 5. a) Categorize the DDL and DML commands :CREATE, TRUNCATE, DELETE, GRANT, ROLLBACK, SELECT

    [2]

    b) Write output of the following SQL queries :i) SELECT TRUNCATE(22.78,1);ii) SELECT DAYOFMONTH(2010-10-17);iii) SELECT SUBSTRING(Common Wealth Games 2010,8,6);iv) SELECT CONCAT(LOWER(Class),UPPER(xii));

    [2]

    c) Consider the table Flight given below, write command in SQL for (1) to (4) and output for (5) to (8).Table : FLIGHT

    [6]

    Page 12 of Pages 12

  • 8/3/2019 INFOPRACREV

    13/14

    Flight_No Origin Destination Seats FlightDate Rate1005 Varanasi Nepal 275 12-Dec-07 30002785 Delhi Kerala 290 17-Jan-08 55006587 Mumbai Varanasi 435 19-Feb-08 50001265 Varanasi Nepal 200 02-Jan-08 54004457 Delhi Lucknow 150 22-Feb-08 45006856 Varanasi Mumbai 180 03-Mar-08 6000

    (1) To display Flight flying between Varanasi and Nepal.(2) To display the different Origin of Flights.(3) To display list of flights in descending order of Rate.(4) To display flight details of the flight whose flightdate is after Jan 2008.(5) SELECT Flight_No, Destination FROM Flight WHERE Destination LIKE _u%;(6) SELECT Origin, COUNT(*) FROM Flight GROUP BY Origin;(7) SELECT Origin, Destination FROM Flight WHERE seats>400;(8) SELECT SUM(Rate),MAX( Seats) FROM Flight;

    Q 6. Answer the following question.

    a) Write an SQL query to create the table Books with the following structure-Field Type ConstraintBook_Id Varchar(6) Primary KeyBook_Name Varchar(25)Author_Name Varchar(30)Publisher Varchar(20)Price Integer Type Varchar(15)Quantity Integer Not Null

    [2]

    b) In a database there are two tables Patient and Doctors are shown below-Table: Patient

    Name Patient_No Date_Adm Doctor_NoKishor P104 2009-05-15 502Ragini P202 2010-01-11 165Reshu P754 2007-12-31 325Kanti P612 2010-04-22 165

    Table: DoctorDoctor_No Doctor_Name Speciality122 M. K Singh Dentist165 R. K. Tiwari Neurology325 V. K. Chauhan Surgery502 N. Singh Nephrology530 K. P. Sinha Urology

    i) Name the columns which can be made Primary Key in both the tables.ii) What will be the cardinality of Cartesian product of both the tables?

    [2]

    Page 13 of Pages 12

  • 8/3/2019 INFOPRACREV

    14/14

    c) Consider the tables given below.Table : STOCK

    Itcode Itname Dcode Qty unitpr Stkdate444 Drawing Copy 101 10 21 31-June-2009445 Sharpener Camlin 102 25 13 21-Apr-2010450 Eraser Natraj 101 40 6 11-Dec-2010452 Gel Pen Montex 103 80 10 03-Jan-2010457 Geometry Box 101 65 65 15-Nov-2009467 Parker Premium 102 40 109 27-Oct-2009469 Office File 103 27 34 13-Sep-2010

    Table : DEALERSDcode Dname Location

    101 Vikash Stationers Lanka Varanasi102 Bharat Drawing Emporium Luxa Varanasi103 Banaras Books Corporation Bansphatak Varanasi

    With reference to these tables, write commands in SQL for (i) and (ii) and output for (iii) below-(i) To display the amount that has been spent to purchase Office file & Sharpener camlin.(ii) To display all the items of Vikash Stationers.(iii) SELECT DCODE,COUNT(QTY),AVG(UNITPR) FROM STOCK GROUP BY DCODE;

    [6]

    Q 7. a) What benefit does an e-business offers to the customers? [1]b) How has society benefited from e-governance? [2]c) Mr. Kartik is working as a Manager in Flash Telecomm. He wants to create the forms with thefollowing functions. Choose appropriate controls from Text Field, Label, Radio Button, Check Box,List Box, Combo Box, Command Button and write in the third column.

    SNo Control Used to Control1 Enter Name of Customer 2 Enter Mobile No.3 Select Connection Type4 Display total Amount of Bill

    [2]

    Page 14 of Pages 12