Informatics Practices 2014 CBSE [Delhi] Set I

To Access the full content, Please Purchase

  • Q1

    (a) Define e-learning. Give one popularly used website of e-learning.


    (b)“Use of e-governance has its social and economic impacts.” Justify.

    (c) Steeve Antony works for HM Academy. He wants to create controls on a form for the following operations. Choose appropriate controls from Text box, Label, Radio Button, List box, Combo box, Check box and Command button.

    S.No

    Operation

    1.

    Enter Name of Employee

    2.

    Select Department from a list of department names

    3.

    Gender out of options M and F

    4.

    Submit form

    [1+2+2 = 5]

    Marks:5
    Answer:

    (a) The E-Learning is an electronic learning system in which the learning is made easy with the help of digital content.

    The www.extramarks.com is one of the popularly used website of e-learning.


    (b) Electronic governance or e-governance is the application of information and communication technology (ICT) for delivering government services, exchange of information communication transactions, integration of various stand-alone systems and services.

    By MCA-21 E-governance website, general public can get information regarding the registered companies; due to this facility public can identify fraud companies. Using e-governance facility the fake passport can be identified easily and passport department can control the crime using passports.

    (c)

    S.No

    Operation

    Control

    1.

    Enter Name of Employee

    jTextField

    2.

    Select Department from a list of department names

    jList

     

    3.

    Gender out of options M and F

    jRadioButtons, ButtonGroup

    4.

    Submit form

    jButton

    View Answer
  • Q2

    (a) State two advantages of networking computers instead of having standalone computers.

    (b) What was the objective behind developing UNICODE?

    (c) Expand the following terms:
    (i) WAN
    (ii) OSS

    (d) What is the purpose of switch in a network?

    (e) Identify the following devices:
    (i) An intelligent device that connects several nodes to form a network and redirects the received information only to intended node(s).
    (ii) A device that regenerates (amplifies) the received signals and re-transmits it to its destination.

    (f) What is the name of the network topology in which each node is connected independently using a switch?

    (g) What is meant by “Denial of Service” with reference to Internet service? [1+1+1+1+2+2+2 = 10]

    Marks:10
    Answer:

    (a) Advantages of networking computers instead of having standalone computers are-
    i) In networking a user can log on to a computer anywhere on the network and access their work files from the file server whereas, the standalone computer does not provides this facility.
    ii) In networking, computers can be managed centrally that result in faster installation of an application.

    (b) Unicode is 16 bits encoding standard in which every character, digit, or symbol is assigned a unique numeric value that applies across different platforms and programs to support different languages and scripts.

    (c)
    (i) WAN- Wide Area Network
    (ii) OSS- Open Source Software

    (d) A Switch is a network device that works as a smart hub and is used to connect various computers over a network between two network devices.

    (e) (i) Switch

    (ii) Repeater

    (f) In star topology each node is connected independently using a switch. The star topology reduces the chance of network failure by connecting all of the systems to a central node.

    If the centralize device called switch/hub fails, the entire system is affected.


    (g) A Denial of Service (DoS) attack is an attempt to make one or more network resources unavailable to their legitimate users.

    Examples of such attacks are:
    Denial of Access to Information: Corrupting, Encrypting, or changing the status of information so that it is not accessible to its legitimate user.
    Denial of Access to Application: Forced shutting of an application as soon as the user opens it.
    Denial of Access to Resources: Blocking a resource, may be a printer or scanner or USB port, of a computer from proper working.
    Denial of Access to a Website: Continuously sending bulk requests to a website so that it is not available to any other user.

    View Answer
  • Q3

    (a) Distinguish between ‘/’ and ‘%’ operators.

    (b) What is a button group? Which control is generally used with a button group?

    (c) Which property of ListBox is used to display values in the list?

    (d) Which tags of HTML are used to
    (i) Change the font in a page?
    (ii) Add a row in a table?

    (e) What will be the values of variables sum and sum1 after the execution of the following loops?

    (f) What will be displayed in jTextArea1 after the execution of following loops?

    for (int i=5; i <=25; i + =5)

    jTestArea1.setText(jTextArea1.getText() +” ” + Integer.toString(2*i));

    (g) Explain with the help of example(s) the difference between container and empty elements of HTML.

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

    Marks:10
    Answer:

    (a) The ‘/’ is used for dividing the operands whereas ‘%’ is used for computing the reminder of dividing operands.

    (b) The ButtonGroup component manages the selected/unselected state for a set of buttons. For the group, the ButtonGroup instance guarantees that only one button can be selected at a time.
    Initially, all buttons managed by a ButtonGroup instance are unselected.
    The radio button controls are used with the button group object to make sure that only one radio button is selected at a time from the specified group.

    (c) In Netbeans, the Model property of a ListBox control is used to display values in the List.

    (d)
    (i) The < font > tag of HTML is used to change the font in a page.
    Example-
    < font size="3" color="red" >This is some text!< /font >

    (ii) The < tr > tag of HTML is used to add a row in a table.

    Example-

    < table border="1" style="width: 100%" >
    < tr >
    < td >Orange< /td >
    < td >50< /td >
    < /tr >
    < /table >


    (e) The variable sum will contain value 5 after the execution of the loop.
    The variable sum1 will contain value 10 after the execution of the loop.

    (f) The following value would be displayed in jTextArea1 after the execution of the loop: 10 20 30 40 50

    (g) The HTML tags are divided into two types- Container tag and Empty tag.

    The Container tags have both the opening tags and the closing tags whereas, the Empty tags are tags that contains only opening tag they do not have closing tags.

    Example –

    Container tag:

    < html > is the opening tag
    < /html > is the closing tag

    Empty tag:

    < img src="" > only opening tag
    < br > only opening tag

    View Answer
  • Q4

    (a) Write two examples of DBMS software.

    (b)What happens when Autocommit is set on?

    (c) What is meant by NULL value in MySQL?

    (d) Table ‘Club’ has 4 rows and 3 columns. Table ‘Member’ has 2 rows and 5 columns. What will be the cardinality of the Cartesian product of them?

    (e) A numeric data field CHANGER contains 25565.7765. Write a command to round off CHANGER
    (i) Up to 2 decimal places(i.e., expected result 25565.78)
    (ii) whole number( i.e., expected result 25566)

    (f) Name methods used to perform the following in NetBeans:
    (i) To set component visible at run time
    (ii) To return the index value of the selected item from the list


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

     

    Marks:10
    Answer:

    (a) Two examples of DBMS softwares are- MySQL, PostgreSQL, Microsoft Access, SQL Server etc.

    (b) In case when autocommit is set to ON, as soon as you execute a statement that updates (modifies) a table, MySQL stores the update on disk to make it permanent.

    (c) The NULL in MySQL represents “a missing unknown value” and it is treated somewhat differently from other values.

    (d) Cardinality of the Cartesian product of both the tables will be: 8

    (e)
    (i) SELECT ROUND(25565.7765,2);
    (ii) SELECT ROUND(25565.7765);

    (f)

    (i) In Netbeans the setVisible() method is used to show or hide the control at run time.
    The code jTextFiled1.setVisible(false); will hide the control during program run whereas code jTextFiled1.setVisible(true); will make the control visible during program run.
    (ii) The method getSelectedValue() is used to return the selected item from the list. Example-

    String value = (String) jList1.getSelectedValue();

    View Answer
  • Q5

    (a) State difference between date functions NOW() and SYSDATE() of MySQL.

    (b)Name a function of MySQL which is used to remove trailing and leading spaces from a string.

    (c) Consider the following table named “SBOP” with details of account holders.

    Write commands of MySQL for (i) to (iv) and output for (v) to (vii).

    Table: SBOP

    Accountno

    Name

    Balance

    DateOfopen

    Transaction

    SB-1

    Mr. Anil

    15000.00

    2011-02-24

    7

    SB-2

    Mr. Amit

    23567.89

     

    8

    SB-3

    Mrs. Sakshi

    45000.00

    2012-02-04

    5

    SB-4

    Mr. Gopal

    23812.35

    2013-09-22

     

    SB-5

    Mr. Dennis

    63459.80

    2009-11-10

    15


    (i) To display Accountno, Name and DateOfopen of account holders having transactions more than 8.

    (ii) To display all information of account holders whose transaction value is not mentioned.

    (iii) To add another column Address with datetype and size as VARCHAR(25).

    (iv) To display the month day with reference to DateOfopen for all the account holders.

    (v) SELECT Count(*) FROM SBOP;

    (vi) SELECT Name, Balance FROM SBOP
    WHERE Name LIKE “ % i”;

    (vii) SELECT ROUND(Balance,-3) FROM SBOP WHERE Accountno=”SB-5”;

    [2+1+7 = 10]

    Marks:10
    Answer:

    (a) The NOW() function returns the current date and time whereas, the SYSDATE() function returns the time at which the function executes.

    (b) The TRIM() function is used to remove leading and trailing spaces from a string.

    (c)
    (i) select Accountno, Name, DateOfopen

    From SBOP

    Where Transaction > 8;

    (ii) select * from SBOP

    Where Transaction Is NULL;

    (iii) Alter Table SBOP
    Add(size varchar(25));

    (iv) Select Month(DateOfopen)
    from SBOP;

    (v)

    count(*)

    5


    (vi)

    Name

    Balance

    Mrs. Sakshi

    45000


    (vii)

    Round(Balance,-3)

    63000

     

    View Answer
  • Q6

    (a) Write MySQL command to create the table SHOP with given structure and constraint:

     

    Table: SHOP

    Column_Name

    DataType(Size)

    Constraint

    Fno

    Int(10)

    Primary Key

    Fname

    Varchar(15)

     

    Type

    Char(10)

     

    Stock

    Int(3)

     

    Price

    Decimal(8,2)

     

     


    (b) In a Database Multiplexers, there are two tables with the following data.

    Write MySQL queries for (i) to (iii), which are based on TicketDetails and AgentDetails:

    Table: TicketDetais

    Tcode

    Name

    Tickets

    A_code

    S001

    Meena

    7

    A01

    SOO2

    Vani

    5

    A02

    S003

    MeeNA

    9

    A01

    S004

    Karish

    2

    A03

    S005

    Suraj

    1

    A02

     


    Table: AgentDetails

    Acode

    AName

    A01

    Mr.Robin

    A02

    Mr.Ayush

    A03

    Mr.Trilok

    A04

    Mr.John

     

    (i) To display Tcode, Name and Aname of all records where the number of tickets sold is more than 5.

    (ii) To display total number of tickets booked by agent “Mr Ayush”.

    (iii) To display Acode, Aname and corresponding Tocde where Aname ends with “k”.

    (c) With reference to ‘TicketDetails’ table, which column is the primary key? Which column is the foreign key? Give reason(s).

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

    Marks:10
    Answer:

    (a) Create table SHOP( Fno integer(10) Primary Key, Fname varchar(15), Type char(10), Stock integer(3), Price decimal(8,2));

    (b)
    (i) select T.Tcode, T.Name, A.Aname
    From TicketDetails T, AgentDetails A
    Where T.Acode==A.Acode AND T.Tickets > 5;

    (ii) select sum(T.Tickets)
    From TicketDetails T, AgentDetails A
    Where A.Aname=’ Mr. Ayush ’;

    (iii) Select T.Tcode, T.Acode, A.AName

    from TicketDetails T, AgentDetails A
    where T.Tcode==A.Tcode AND A.Aname LIKE ‘ % k’;

    (c) Tcode - Primary Key
    The field Tcode is used to uniquely identify each field.
    Acode- Foreign key
    The field Acode has a link given with the same name in the child table as well.

     

    View Answer
  • Q7

    (a) Define the term ‘Inheritance’.

    (b) Rewrite the following program code using Switch Case statement
    int choice=Integer.parseInt(jTextField1.getText());

    if(choice==1)

    jTextField2.setText(“January”);

    else if(choice==2)

    jTextField2.setText(“February”);

    else if(choice==3)

    jTextField2.setText(“March”);

    else if(choice==4)

    jTextField2.setText(“April”);

    else if(choice==5)

    jTextField2.setText(“May”);

    else

    jTextField2.setText(“Only 1 to 5 please”);

    (c) What will be the value X1 after the execution of the following code?

    String X1=”Graduate”, X2=”Post”;
    X1=X2.concat(X1);

    (d) Write Java statement to make a jTextFiled1 un-editable during execution.

    (e)What will be displayed in jTextArea1 after the execution of the following code?

    int z=4;

    do

    {

    jTextArea1.setText(Integer.toString(++z));

    z=z+1;

    }while(z<=8);


    (f)Give the output of the following java code:

    String name=”Sid Nayer”;

    int T=name.length(),N;

    N=150-T;

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

    jTextField3.setText(Integer.toString(N));


    (g) Abraham is a programmer at Shouryen World School. He created the following GUI in Netbeans. The grade is calculated on the basis of percentage of total marks in five subjects (English, Maths, Physics, Chemistry, Computers). The Grade is calculated using the following criterion:

    (Each subject marks is out of 100)

     

    Percentage

    Grade

    >= 90

    A

    = 70 & < 90

    B

    = 50 & < 70

    C

    = 33 & < 50

    D

    < 33

    F



    Help him to write code for the following:

     

    (i) Write Java code to calculate and display Total(as sum of marks obtained in all the subjects), Percentage (as Total/5) and Grade on the basis of Percentage of marks and the given criteria on the click of Command Buttons [Calculate Total], [Calculate %] and [Calculate Grade] respectively.

    (ii) Write Java code to clear all Textboxes on the click of [Clear] button.

    (iii) Write Java code to close the application on the click of [Exit] button.

     

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

    Marks:15
    Answer:

    (a) Inheritance is a capability/property of a class to inherit the properties of another class. The keyword extends is used to inherit the properties of the base class into derived class (child class).
    The various types of inheritance are- Single level Inheritance, Multilevel Inheritance, Multiple Inheritance and Hierarchical inheritance and hybrid inheritance.
    Java does not support Multiple Inheritance.

    (b)

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

    switch (choice)

    {

    case 1: jTextField2.setText(“January”);

                    break;

    case 2: jTextField2.setText(“February”);

                    break;

    case 3: jTextField2.setText(“March”);

                    break;

    case 4: jTextField2.setText(“April”);

                    break;

                    case 5: jTextField2.setText(“May”);

                    break;

    default: jTextField2.setText(“Only 1 to 5 please”);

                  }

     

    (c) Value of X1 after executing the code: PostGraduate

    (d) The following code is used to make a jTextfiled1 un-editable during execution:

    jTextfiled1.setEditable(false);

    (e) The output will be: 9

    (f) jTextField2=9

    jTextField3=141

     

    (g)

    (i)

    private void btnTotalActionPerformed(java.awt.event.ActionEvent evt) {

    int English, Maths, Physics, Chemistry, Computers, Total;

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

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

    Physics=Integer.parseInt(jTextField4.getText());

    Chemistry=Integer.parseInt(jTextField5.getText());

    Computers=Integer.parseInt(jTextField6.getText());

    Total=English+Maths+Physics+Chemistry+Computers;

    jTextField7.setText(Integer.toString(Total));

    }

    private void btnPercentageActionPerformed(java.awt.event.ActionEvent evt) {

    int Percentage;

    Percentage=(Integer.parseInt(jTextField7.getText())/5);

    jTextField8.setText(Integer.toString(Percentage));

    }

    private void btnGradeActionPerformed(java.awt.event.ActionEvent evt) {

    int per;

    char Grade;

    per=Integer.parseInt(jTextField8.getText());

    if(per >= 90)

    Grade='A';

    else if(per >= 70 && per < 90)

    Grade='B';

    else if(per >= 50 && per < 70)

    Grade='C';

    else if(per >= 33 && per < 50)

    Grade='D';

    else

    Grade='F';

    jTextField9.setText(Character.toString(Grade));

    }

    (ii)

    private void btnClearActionPerformed(java.awt.event.ActionEvent evt) {

    jTextField1.setText(" ");

    jTextField2.setText(" ");

    jTextField3.setText(" ");

    jTextField4.setText(" ");

    jTextField5.setText(" ");

    jTextField6.setText(" ");

    jTextField7.setText(" ");

    jTextField8.setText(" ");

    jTextField9.setText(" ");

    }

     

    (iii)

    private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {

    System.exit(0);

    }

    View Answer