Informatics Practices 2013 CBSE [ Outside Delhi] Set I

To Access the full content, Please Purchase

  • Q1

    (a) How has popularity of e-Business benefited a common man? Write domain name of one popular e-Business site as an example.

    (b) Give domain names of two most commonly used e-Commerce site.

    (c) Shobhit is creating a form for his company. Help her to choose most appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and Command Button for the following entries:

    SNo

    Function

    1

    To enter NATIONALITY from all the3 nationalities given as options

    2

    To enter AGE between range 20 to 25

    3

    To allow to select one or more FAVORITE SPORTS out of the given 6 options

    4

    To enter SUGGESTION in the form of a paragraph

    [2+1+2=5]

    Marks:5
    Answer:

    (a) The benefits of E-Business are:
    • The e-business has improved the speed of response
    It is a cost saving process
    It has improved the efficiency and productivity
    Domain names of some popular e-business sites are:
    makemytrip.com
    yatra.com
    (b) Domain names of some popular e-commerce sites are:
    ebay.com
    flipkart.com

    (c) The following controls can be used to perform the action:

    SNo

    Function

    Control

    1

    To enter NATIONALITY from all the nationalities given as options

    jComboBox

     

    2

    To enter AGE between range 20 to 25

    jComboBox

    3

    To allow to select one or more FAVORITE SPORTS out of the given 6 options

    jListBox

    4

    To enter SUGGESTION in the form of a paragraph

    jTextArea

    View Answer
  • Q2

    (a) Write the name of the most suitable wireless communication channels for each of the following situations.(i) Communication between two offices in two different countries.
    (ii) To transfer the data from one mobile phone to another.

    (b) What is UNICODE? Name one Indian language, which is supported by UNICODE.
    (c) Expand the following terms:
    (i) FLOSS
    (ii) HTTP

    (d) Mr. Chandervardhan is not able to identify the Domain Name in the given URL. Identify and write it for him.
    http://www.cbse.nic.in/aboutus.htm

    (e) What do you understand by Network Security? Name two common threats to it.

    (f) Write one advantage of Star Topology over Bus Topology and one advantage of Bus Topology over Start Topology.

    (g) What is MAC address? What is the difference between MAC address and an IP address?

     

    Marks:10
    Answer:

    (a)

    (i) Satellite

    (ii) Bluetooth

    (b)Unicode is a character coding system that provides the unique number for every character. It also supports classical and historical texts of many languages.

    Gurumukhi is an example of Indian language, which is supported by UNICODE.

    (c)
    (i) FLOSS:
    Free Libre and Open Source Software
    (ii) HTTP: Hyper Text Transfer Protocol

    (d) Domain Name is: cbse.nic.in

    (e) Network security is used to protect and monitor unauthorized access of data during their transmission or denial of a computer network and to guarantee that data transmissions are authentic.
    Two common threats are:
    1. Trojan Horse
    2. Worms
    (f) Advantage of star topology over bus topology:

    In star topology, if a node fails, then the other nodes does not affect, the other all nodes remain active. Whereas in case of bus topology if the main cable encounters some problem then the whole network beak downs.

    Advantage of bus topology over star topology:

    The bus topology is cheaper because it requires less cable connection than the star topologies.
    (g) A Media Access Control address (MAC address) is a unique number assigned to the network adopters or network interface cards for communications on the physical network segment.
    Difference between MAC address and an IP address:
    1. The MAC address is the unique address assigned to the network interface card whereas IP address is the unique address assigned to the computer.
    2. An IP address is assigned by the network administrator or ISP whereas the MAC addresses is embedded on the device or on the NIC during manufacturing.

    View Answer
  • Q3

    (a) Which property of palette ListBox is used to enter the list of items while working in NetBeans?


    (b) What is the difference between the use of JTextField and JPasswordField in a form?


    (c) “The variable/expression in the switch statement should either evaluate to an integer value or String value.” State True or False.


    (d) Name two attributes of FONT tag of HTML.


    (e) How many times will the following loops execute? Which one of them is Entry Control and which one is Exit Control?

    Loop1

    int i=10, sum=0;

    while(i>1)

    {

    sum+=i;

    i-=3;

    }

    Loop2

    int i=10, sum=0;

    do

    {

    sum+=i;

    i-=3;

    }while(i>1);

     

    (f) What will be displayed in jTextField1 and jTextField2 after the execution of the following loop?
    int Sum=0, Last=10;
    for(int C=1; C<=Last; C+=2)
    Sum++;
    jTextField1.setText(Integer.toString(Sum));
    jTextField2.setText(Integer.toString(C));


    (g) Differentiate between the < TR > and < TD > tags of HTML with the help of an appropriate example.

    Marks:10
    Answer:

    (a) The Model Property of palette ListBox is used to enter the list of items while working in NetBeans.

    (b) The jTextField accepts and shows the input values in the form of text and numbers as they are entered into it. Whereas the jPasswordField show the values which are entered into it in the form of dots(.) for the security purpose.

    The jPassowordField is the best choice to input the hidden text such as password.


    (c) The statement is TRUE.


    (d) The two attribute of Font tag of HTML is:
    1. Size attribute
    2. Face attribute


    (e) Both the loops will run three times. The loop1 is the entry control loop whereas the loop2 is exit control loop.


    (f) The jTextField1 will display value 5 and jTextField2 will display value 11


    (g) The tag < TR > is used to define table row whereas the tag < TD > is used to define table data which is presented in the cell of a table.

    View Answer
  • Q4

    (a) Write a SQL command to view the constraints of EMP table.

    (b) Mr. Krishnaswami is working on a database and has doubt about the concept of SAVEPOINT in a transaction. Write down the meaning of SAVEPPOINT and provide a simple example considering yourself as an online web support executive.


    (c)What is the difference between CURDATE() and DATE() functions?


    (d) Table STUDENT has 4 rows and 2 columns. Table MARKS has 2 rows and 3 columns. What will be the cardinality and degree of the Cartesian products of STUDENT and MARKS?


    (e) There is a column Salary in a Table EMPLOYEE. The following two statements are giving different outputs. What may be the possible reasons?

    SELECT COUNT (*) FROM EMPLOYEE;
    SELECT COUNT (Salary) FROM EMPLOYEE;


    (f) Mr. Kapoor is a programmer at Ekansh Enterprise. He created 5 digit password and stored in a string variable called strPassword. He wants to store the same password in an integer type variable called intPassword. Write an appropriate Java statement to transfer the content from strPassword to intPassword.


    (g) Mrs. Kumar is using table STUDENTS with the following columns:
    RNO, ADMNO, NAME, AGGREGATE

    She wants to display all information of students in descending order of names and within ascending order of aggregate. She wrote the following SQL query and she did not get the desired output:

    SELECT * FROM STUDENT
    ORDER BY NAME, AGGREGATE DESC;

    Rewrite the above query to get the desired output.

    [1+1+1+1+2+2+2=10]

    Marks:10
    Answer:

    (a) SHOW CREATE TABLE EMP;

    (b) The SAVEPOINT statement is used to set a named transaction savepoint with a name of variable. The new savepoint will override the old savepoint if the old savepoint has the same name as that of new savepoint.
    Example:

            CREATE TABLE MYTEST 
            (
                     ID INT NOT NULL PRIMARY KEY,
                     NAME VARCHAR(30) NOT NULL
             ) ENGINE=InnoDB;
     
            START TRANSACTION;
     
            INSERT INTO MYTEST VALUES(100,’ROLLY’);
     
             SELECT  *  FROM  MYTEST;
     
                     ID              NAME
            ---             -------
                     100            ROLLY
     
            SAVEPOINT POINT1;
     
            INSERT INTO MYTEST VALUES (101,’SHELLY’);
     
            SELECT * FROM MYTEST;
     
             ID             NAME
            ---             ------
            100            ROLLY
            102            SHELLY
     
            ROLLBACK TO POINT1;
     
            SELECT * FROM MYTEST;
     
             ID             NAME
            ---             ------
            100            ROLLY

    (c) The CURDATE() returns the current date as a value in 'YYYY-MM-DD' or YYYYMMDD format. Whereas the DATE() extracts the date part of the date or datetime expression expr.
    Example:

    SELECT CURDATE ();
    Output:    '2013-06-13'
     
    SELECT DATE ('2012-12-31 01:02:03');
    Output:   '2012-12-31'


    (d) The cardinality of the Cartesian product of STUDENT and MARKS will be 8 and degree will be 5.

    (e) The salary column is containing some NULL values instead of salary amount due to which the function count (salary) is not counting those fields. Hence, the count (*) and count (salary) are giving different result.
    For example:

    If the table Employee containing records of 10 employees, out of which salary column of four employees are containing NULL values then the statement SELECT COUNT(*) FROM EMPLOYEE; will result in 10 counts whereas the statement SELECT COUNT(SALARY) FROM EMPLOYEE; will result in 6 count.

    (f) The following statement can be used to transfer the content form strPassword to intPassword:

    int intPassword;
    int intPassword = Interger.parseInt(strPassword);
    (g) SELECT * FROM STUDENT

    ORDERBY AGGREGARE, NAME DESC;

    View Answer
  • Q5

    (a) What is the use of COMMIT statement in SQL? How is it different from ROLLBACK statement?

    (b) Mr. James created a table CLIENT with 2 rows and 4 columns. He added 2 more rows to it and deleted one column. What is the Cardinality and Degree of the Table CLIENT?

    (c) Consider the following table FITNESS with details about fitness products being sold in the store. Write commands of SQL for (i) to (iv) and output for (v) to (vii).

    Table: FITNESS

    PCODE

    PNAME

    PRICE

    MANUFACTURER

    P1

    Treadmill

    21000

    Coscore

    P2

    Bike

    20000

    Aone

    P3

    Cross Trainer

    14000

    Reliable

    P4

    Multi Gym

    34000

    Coscore

    P5

    Massage Chair

    5500

    Regrosene

    P6

    Belly Vibrator Belt

    6500

    Ambaway

     

    (i) To display the names of all the products with price more than 20000.
    (ii) To display the names of all the products by the manufacturer “Aone”.
    (iii) To change the price data of all the products by applying 25% discount reduction.
    (iv) To add a new row for product with the details: “P7” , “Vibro Exerciser”, 28000, “Aone”.

    (v) SELECT * FROM FITNESS

    WHERE MANUFACTURER NAME LIKE “%e”;

    (vi) SELECT COUNT(DISTINCT(MANUFACTURER)) FROM FITNESS;

    (vii) SELECT MAX(PRICE) FROM FITNESS;

    [2+1+7=10]

    Marks:10
    Answer:

    (a) The COMMIT command ends the current transaction by saving database changes and starts a new transaction whereas the ROLLBACK command ends the current transaction by discarding changes and starts a new transaction.

    (b) The cardinality will be 4 and degree will be 3.

    (c)
    (i) SELECT PNAME, PRICE

    FROM FITNESS

    WHERE PRICE> 20000;

     

    (ii) SELECT PNAME

    FROM FITNESS

    WHERE MANUFACTURER = “Aone”;

     

    (iii) UPDATE FITNESS

    SET PRICE = PRICE – (PRICE *25/100);

     

    (iv) INSERT INTO FITNESS VALUES(“P7”, “Vibro Exerciser”, “28000”, “Aone” );

     

    (v) Error will come due to wrong field name.

    The correct query will be:

    SELECT * FROM FITNESS

    WHERE MANUFACTURER LIKE “%e”;

     

    After executing this query the output will be:

               PCODE

    PNAME

    PRICE

    MANUFACTURER

    P1

    Treadmill

    21000

    Coscore

    P2

    Bike

    20000

    Aone

    P3

    Cross Trainer

    14000

    Reliable

    P4

    Multi Gym

    34000

    Coscore

    P5

    Massage Chair

    5500

    Regrosene

     

    (vi)

     

    COUNT(DISTINCT MANUFACTURER)

     

    5

     

     

     

     

     

    (vi)

     

    MAX(PRICE)

     

    34000

     

     

     

    View Answer
  • Q6

    (a) Write SQL command to create the table VEHICLE with given constraint.

    Table: VEHICLE

    COLUMN_NAME

    DATATYPE(SIZE)

    CONSTRAINT

    RegNo

    CHAR(10)

    Primary Key

    Regdate

    DATE

     

    Owner

    VARCHAR(30)

     

    Address

    VARCHAR(40)

     


    (b) In a Database BANK, there are two tables with a sample data given below:
    Table: EMPLOYEE

    ENO

    ENAME

    SALARY

    ZONE

    AGE

    GRADE

    DEPT

    1

    Mona

    70000

    East

    40

    A

    10

    2

    Muktar

    71000

    West

    45

    B

    20

    3

    Nalini

    60000

    East

    26

    A

    10

    4

    Sanaj

    65000

    South

    36

    A

    20

    5

    Surya

    58000

    North

    30

    B

    30


    Table: DEPARTMENT

    DEPT

    DNAME

    HOD

    10

    Computers

    1

    20

    Economics

    2

    30

    English

    5

    Note:

    • ENAME refers to Employee Name

    DNAME refers to Department Name

    DEPT refers to Department Code

    HOD refers to Employee number (ENO) of the head of the Department.

    Write SQL queries for the following:
    (i) To display ENO, ENAME, SALARY and corresponding DNAME of all the employees whose age is between 25 and 35(both values inclusive).


    (ii) To display DNAME and corresponding ENAME from the tables DEPARTMENT and EMPLOYEE. Hint: HOD of the DEPARTMENT table should be matched with ENO of the EMPLOYEE table for getting the desired result.


    (iii) To display ENAME, SALARY, ZONE and INCOME TAX (Note: Income Tax to be calculated as 30% of salary) of all the employees with appropriate column headings.


    (c) In a database STUDENT, there is a Table RESULT with the following contents:
    Table: RESULT

    REGNO

    NAME

    MARKS

    SECTION

    CLASSTEACHER

    ADMNO

    10004

    Mohit

    90

    A

    Ms Nathani

    Z101

    10211

    Mukta

    85

    B

    Mr Gokhle

    Z109

    10923

    Mohit

    92

    B

    Mr Gokhle

    Z120

    10313

    Sana

    80

    A

    Ms Nathani

    Z234

     

     

            

     

     

     

    (i) Identify the attributes, which can be chosen as Candidate Keys in the table RESULT.

    (ii) Write SQL Query to change the Marks of Mukta to 95 in the table RESULT.

    [2+2+2+2+1+1=10]

    Marks:10
    Answer:

    (a)
    CREATE TABLE VEHICAL

    (RegNo char(10) PRIMARY KEY,

    Regdate DATE,

    Owner VARCHAR(30),

    Address VARCHAR(40) );

    (b) (i) SELECT ENO, ENAME, SALARY, DNAME

    FROM EMPLOYEE, DEPARTMENT
    WHERE EMPLOYEE.DEPT = DEPARTMENT.DEPT AND
    (AGE>=25 && AGE<=35);

    (ii) SELECT D.DNAME, E.ENAME
    FROM EMPLOYEE E, DEPARTMENT D
    WHERE E.DEPT=D.DEPT AND E.ENO=D.HOD;

    (iii)
    SELECT ENAME, SALARY, ZONE, (SALARY*30)/100
    AS “INCOME TAX”
    FROM EMPLOYEE;

    (c)
    (i) REGNO and ADMNO can be chosen as Candidate Keys.
    (ii) UPDATE RESULT SET MARKS=95
    WHERE NAME=”Mukta”;

    View Answer
  • Q7

    (a) What will be the content of jTextArea1 and jTextField1 after the execution of the following statement?
    (i)
    jTextArea1.setText(“JusttAnothernDay”);
    (ii) String Subject = “Informatics Practices”;
    jTextField1.setText((Subject.length() +10)+ “ “);

    (b) Rewrite the following programme code using a if statement:
    String Remarks;

    int Code= Integer.parseInt(jTextField1.getText());

    switch(Code)

    {

    case 0: Remarks = “100% Tax Exempting”;

    break;

    case 1: Remarks = “50% Tax Exemption”;

    break;

    case 2: Remarks =”30% Tax Exemption”;

    break;

    default: Remarks = “!Invalid Entry”;

    }

     

    (c) Observe the following code carefully and find which statement will never get executed in the code?

    int t=1; //Statement 1

    do //Statement 2

    { //Statement 3

    if(t>13) //Statement 4

    jTextFiled1.setText(“Something”); //Statement 5

    else //Statement 6

    jTextFiled.setText(“Pass”); //Statement 7

    t+=3; //Statement 8

    } //Statement 9

    while(t<=15); //Statement 10

     

    (d) Write a java statement to make the jTextField1 non-editable.

    (e) What will be displayed in jTextField1 and jTextField2 after the execution of the following code?

    int LAST, First=3, Second=5;

    Last= First+Second++;

    jTextField1.setText(Integer.toString(Last));

    jTextField2.setText(Integer.toString(Second));

     

    (f) What will be the contents of Str1 and Str2 after the following code is executed?

    String Str2, Str1;

    Str= “Dear Friend”;

    Str2=”Hello”;

    Str1=Str2.concat(Str1);

     

    (g) Aditya is a programmer at Edudel enterprises. He created the following GUI in NetBeans.

     

    Help him to write code in Java for the following:

    (i) To calculate Total marks obtained and display in jTextField4 on the click of command button “Get Total”.

    (ii) To calculate Grade obtained and display in jTextField5 on the click of command button “Get Grade”. Criteria for Grade calculation is given below:

    Marks

    Grade

    Above 80

    A

    Above 65 and <=55

    B

    Above 50 and <=65

    C

    <=50

    D

     

     

     

     

     

     

     

     


    (iii) To stop execution and exit from the application on the click of command button “Exit”.

    [2+2+1+1+2+2+2+2+1=15]

    Marks:15
    Answer:

    (a)

    (i) Just Another

    Day

    (ii) 31

    (b)

    String Remarks;

    int Code= Integer.parseInt(jTextField1.getText());

    if(Code==0)

    Remarks = “100% Tax Exempting”;

    else if(Code==1)

    Remarks = “50% Tax Exemption”;

    else if(Code==2)

    Remarks =”30% Tax Exemption”;

    else

    Remarks = “!Invalid Entry”;

     

    (c) Statement 5

    (d) jTextField1.setEditable(false);

    (e) jTextField1 will display 8 and jTextField2 6.

    (f) Str1 = HelloDear Friend

    Str2 = Hello

    (g)

    (i) Code for the click event of Get Total button:

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

    {

    int a, b, c, total;

    a =Integer.parseInt(jTextField1.getText());

    b =Integer.parseInt(jTextField2.getText());

    c =Integer.parseInt(jTextField3.getText());

    total=a+b+c;

    jTextField4.setText(Integer.toString(total));

    }

    (ii) Code for the click event of Get Grade button

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt)

    {

    int ttl= Integer.parseInt(jTextField4.getText());

    int mks=ttl/3;

    if(mks >=80)

    {

    jTextField5.setText(“A”);

    }

    else if((mks >=65) && (mks<=55))

    {

    jTextField5.setText(“B”);

    }

    else if((mks >=50)&&(mks<=65))

    {

    jTextField5.setText(“C”);

    }

    else

    jTextField5.setText(D);

    }

     

    (iii) Code for the click event of Exit button

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt)

    {

    System.exit(0);

    }

    View Answer