Informatics Practices 2018 CBSE [All India] Set I

To Access the full content, Please Purchase

  • Q1

    (a)  ABC Company wants to link its computers in the Head Office in New Delhi to its office in Sydney. Name the type of Network that will be formed. Which Communication media should be used to form this Network?                   2

    (b)  Which of the following is/are not communication media?                            2
          (i)   Microwaves
          (ii)  Optical Fiber cable
          (iii) Node
          (iv) Radio waves

          Identify which of the above mentioned communication media are Wired media and which ones are Wireless media.
    (c) Write two examples each of software in the following categories.                                     2                 
         (i)   Open Source Operating System
         (ii)  Open Source Web Browser
    (d)  Expand the following terms:                     2
        (i)   GSM
        (ii)  IP
    (e ) Name the devices:                                            2
       (i)   This device constantly looks at all the data entering and exiting your connection. It can block or reject data in response to an established rule.
       (ii)  This device connects multiple nodes to form a network. It redirects the received information only to the intended node(s). [2+2+2+2+2= 10]

    Marks:10
    Answer:

    (a) WAN will be formed. Wireless communication media should be used to form this network.
    (b) (iii) Node is not a communication media.
              Microwaves – Wireless
              Optical Fiber Cable – Wired
              Radio waves–Wireless
    (c ) (i) Linux, FreeBSD
          (ii) Google Chrome, Mozilla Firefox
    (d) GSM: Global Systems for Mobile Communication
          IP: Internet Protocol
    (e) (i) Proxy server
         (ii) switch

    View Answer
  • Q2

    (a)  Identify the invalid variable names. State the reason if invalid.                                    1
        (i)   Marks Unit

       (ii)  Product_1

       (iii) Sales 123

       (iv) 2Marks

    (b)  Write the data type of variables that should be used to store: 1
       (i)   Marks of students
       (ii)  Grades of students (Grade can be 'A' or 'B' or 'C')
    (c)  Write examples of any two properties and any two methods of jButton component. 2
    (d)  Write the purpose of HTML. Distinguish between < P > and < BR > tag. 2

    (e) Distinguish between combobox and Listbox.When would you prefer using them over Radiobutton and Checkbox. 2

    (d)  Rewrite the following code using Switch statement. 2

           if (code=='A')

           allowance = 3500;

    else if (code =='B')

           allowance = 3200;

    else

           allowance = 2000;

     

    Marks:10
    Answer:

    (a) (i) Marks Unit- Space between variable name

         (iv) 2Marks – starts with a number

    (b) (i) integer

         (ii) char

    (c) Property:

          1. Background

          2. Enabled

        Method:

         1. getText()

         2. setEnabled()

    (d) HTML is used to create web pages.

    < P > Tag

    < BR > Tag

    Container element used to start a new paragraph.

    Empty element used to give a line break within a paragraph.

     

    (e)

    Combobox

    Listbox

    It is like a drop down box from which we can select an option.

    It provides a scrollable set of items from which one or more may be selected.

     

     

    (f) switch(code)

       {

       case ‘A’: allowance = 3500;

       break;

       case ‘B’ : allowance = 3200;

       break;

       default: allowance = 2000;

      }

    View Answer
  • Q3

    (a)  What is MySQL used for ? Abhay wants to start learning MySQL From where can be obtain the MySQL software?                1

    (b)  In the table 'Student", Priya wanted to increase the Marks (Column Name Marks) of those students by 5 who have got Marks below 33. She has entered the following statement:

    SELECT Marks+5 FROM Student WHERE Marks<33;

    Identify errors (if any) in the above statement. Rewrite the correct SQL statement.                 1

    (c)  (i)   Name the Data type that should be used to store AccountCodes like "A1001" of Customers.      1

          (ii)  Name two Data types that require data to be enclosed in quotes.                      1
    (d)  Given the table 'Player' with the following columns:                                                         2

    Table: Player

    PCODE

    POINTS

    1

    50

    2

    NULL

    3

    40

     

     

    Write the output of the following statements:
    (i) SELECT AVG (POINTS)

     FROM Player;

    (ii)  Select COUNT (POINTS) FROM Player;

    (e)  "Class" table has columns RNO and NAME.

    The following statements are executed:

    SET AUTOCOMMIT = 0;

    INSERT INTO CLASS VALUES (5, 'Rajiv') ;

    COMMIT:

    UPDATE CLASS SET NAME='Rajeev' WHERE ID=5;

    SAVEPOINT A;

    INSERT INTO CLASS VALUES (6, 'Chris') ;

    SAVEPOINT B;

    INSERT INTO CLASS VALUES (7, 'Feroze') ;

    SELECT * FROM CLASS;

    ROLLBACK TO B;

    SELECT * FROM CLASS;

    What will be the output of both the above given SELECT statements?                           2

    (f)  Name SQL Single Row functions (for each of the following) that                                         2
         (i)   returns a number.
         (ii)  returns lowercase letters.
         (iii) returns names of days. For example : "Monday", "Tuesday".
         (iv) returns weekday number. For example: 1 for Sunday, 2. for Monday, 3 for Tuesday. [1+1+1+1+2+2+2= 10]

    Marks:10
    Answer:

    (a) MySQL is used for relational databases. Abhay can download MySQL from internet as it is an open source database.
    (b)  Error: Instead of SELECT, UPDATE query should be used.
         Correct statement: UPDATE Student SET
         Marks=Marks+5 WHERE Marks<33.
    (c) (i) varchar
         (ii) varchar, date
    (d) (i) 30
         (ii) 2

    (e) RNO NAME

         5      Rajiv

         6      Chris

         7     Feroze

     

        RNO  NAME

          5    Rajiv

          6    Chris

    (f) (i) ROUND(x)

        (ii) LCASE(str)

        (iii) DAYNAME(date)

        (iv) DAYOFWEEK(date)

    View Answer
  • Q4

    (a)  Identify the error in the following code:1

    switch (c)

    case 9.0 : a= a+2;

    case 8.0 : a=a+3;

    break;

    (b)  What values will be displayed in JOptionPane when the following code is executed?        2

                  int a = 5, b = 2;

                               while (a < 20)

    {

                               a = a + b ;

                               b = a – b ;

                  JOptionPane.showMessageDialog(null,a);

    }

    (c)  Write the code given below using 'for' loop instead of 'while' loop:                            2

    inti=1;               

                  while(i<=5)

                  if (i * i = 4)

                  jTextField1.setText(“”+i);

                  i=i+1;

    (d)  Write the value that will be stored in variable a after execution of the following code if:     2           

    (i)   initial value of a is 8.

    (ii)  initial value of a is 10.

                  int b = 9;

                  if (a > b)

                  a=a+5;

                  a=a+2;
     

    (e ) What will be the values of i and z after the following code is executed:                     2

           inti=0;

           int z=10;

                  do

    {

                  i=1+2;

                  z--;

                  while (i< 10);

    (f)  Ms. Priya works as a programmer in "Avon Education" where she has designed a software to compute fee charges to be paid by the students. A screenshot of the same is shown below:

    • Name of the student is entered by the user.
       
    • Any one Course out of Pharmacy, Architecture and Arts and Design is chosen by the user.
       
    • If the student is eligible for Concession, the required checkbox is selected by the user.
       
    • Based on the course selected. Fee Per Quarter is displayed the appropriate textfield according to the following criterion:

    Course

    Fee per Quarter

    Pharmacy

    2000.00

    Architecture

    2500.00

    Arts & Design

    2300.00

     

    • If the student is eligible for Concession, a concession of 7% of Fee per quarter is calculated as the concession amount, otherwise concession amount is 0.
    • Fee to be paid is the Fee per quarter with the concession amount (if any) deducted from it.

    Help Ms. Priya in writing the code to do the following:

    (i)   When 'Calculate Charges' button is clicked. 'Fee per quarter', 'Concession Amount', 'Fee to be Paid' should be calculated and displayed in the respective text fields.      4

    (ii)  When 'CLEAR' button is clicked, all the textfields, radiobuttons and checkbox should be cleared.                                        1

    (iii) When 'Exit button is clicked, the application should close.                                                1

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

    Marks:15
    Answer:

    (a) default statement is missing in the code.

    (b) 31

    (c) inti;

    for(i=1;i<=5;i++)

    {

    if(i * i ==4)

    jTextField1.setText(“”+i);

    }

    (d) (i) 10

    (ii) 15

     

    (e) i= 10

    z= 5

    (f)(i) double fee, concession, totalfee;

    if(jRadioButton1.isSelected())

    fee=2000.00;

    elseif(jRadioButton2.isSelected())

    fee=2500.00;

    else

    fee=2300.00;

    jTextfield2.setText(“”+fee);

    if(jComboBox1.isSelected())

    concession=0.07 * fee;

    jTextfield3.setText(“”+concession);

    totalfee= fee-concession;

    jTextfield4.setText(“”+totalfee);

    (ii) jTextfield1.setText(“”);

         jTextfield2.setText(“”);

         jTextfield3.setText(“”);

         jTextfield4.setText(“”);

         jRadioButton1.setSelected(false);

         jRadioButton2.setSelected(false);

         jRadioButton3.setSelected(false);

         jComboBox.setSelected(false);

    (iii) System.exit(0);

    View Answer
  • Q5

    Consider the following table 'Furniture' Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x).

    Table: Furniture

    FCODE

    NAME

    PRICE

    MANUF.DATE

    WCODE

    10023

    Coffee table

    4000

    19-DEC-2016

    W03

    10001

    Dining table

    20500

    12-JAN-2017

    W01

    10012

    Sofa

    35000

    06-JUN-2016

    W02

    10024

    Chair

    2500

    07-APR-2017

    W03

    10090

    Cabinet

    18000

    31-MAR-2015

    W02

    (i) To display FCODE, NAME and PRICEof items that have Price less than Rs.5,000.  1

    (ii)  To display NAMES and PRICE of those Furniture Items that have 'table' anywhere in their names.                                                     1

    (iii) To display WCode of Furniture items. There should be no duplicate values.                          1

    (iv) To display the NAMES and PRICE increased by 500.00 of all the furniture items. (Price should only be displayed as increased; there should be no increase in the data in the table)              1

    (v)  To display FCODE and NAME of each Furniture item in descending order of FCODE. 1

    (vi) To display the details of all the Furniture Items which have manufacturing date (MANUFDATE) between 01-JAN-2016 and 15-JUN-2017 (inclusive of both the dates).   1    

    (vii) To display the average PRICE of all the Furniture Items, which are made of Wood with WCODE as W02. 1

    (viii) To display WCODE wise, WCODE and the highest price of Furniture Items.             1

    (ix) SELECT SUM(PRICE) FROM Furniture WHERE WCODE='W03';                                    1

    (x)  SELECT COUNT (DISTINCT PRICE) FROM Furniture;                                                    1

    Marks:10
    Answer:

    i. SELECT FCODE, NAME, PRICE FROM Furniture WHERE PRICE<5000;

    ii. SELECT NAME, PRICE FROM Furniture WHERE NAME=%table%;

    iii. SELECT DISTINCT WCODE FROM Furniture;

    iv. SELECT NAME,PRICE=PRICE+500 FROM Furniture;

    v. SELECT FCODE, NAME FROM Furniture ORDER BY FCODE Desc;

    vi. SELECT * FROM Furniture WHERE MANUFACTURE BETWEEN ’01-JAN-2016’ and ’15-JUN-2017’;

    vii. SELECT AVG(PRICE) FROM Furniture WHERE WCODE=W02;

    viii. SELECT DISTINCT WCODE,MAX(PRICE) FROM Furniture ORDER BY WCODE;

    ix. 6500

    x. 5

    View Answer
  • Q6

    (a)  Write SQL query to create a table 'Inventory' with the following structure: 2

          

    Field

    Type

    Constraint

    MaterialId

    Integer

    Primary key

    Material

    Varchar (50)

    NOT NULL

    Category

    Char

     

    DatePurchase

    Date

     

    (b)  Consider the following tables PATIENT and TEST and answer the questions that follow: 2

    Table: PATIENT

    PCODE

    NAME

    PHONE

    DTADMIT

    TESTID

    6473

    Amit Sharma

    912356899

    19-JUN-2017

    T102

    7134

    Rose Mathew

    886744536

    12-NOV-2017

    T101

    8786

    Tina Sharma Arora

    889088765

    06-DEC-2017

    T102

    6477

    Vijay Shah

    714567445

    07-DEC-2017

    T502

    7658

    VenkatFazal

    865545343

    31-DEC-2017

    T101

    Note: NAME holds the Names of patients.

    DTADMIT holds Dates on which a patient was admitted to hospital.

    TESTID holds Ids of Medical tests done on patients.

    Table: TEST

    TESTED

    TESTNAME

    COST

    T101

    Platelet

    200.00

    T102

    Hemogram

    190.00

    T301

    Malaria Detection

    350.00

    T502

    Glucose Test

    150.00

     

    Name the Primary keys in both the tables and foreign key to 'PATIENT' table.

    State the reason for your choice.

    (c)  With reference to the above given tables (in Q6 b), write commands in SQL for (i) to (iii).

    (i)   To display Names of Patients. TESTED and Test names for those Patients who were admitted between '01-DEC-2017' and '15-DEC-2017 (both dates inclusive).                           2

    (ii)  To display Names of Patients, Test names and Cost of Test for those Patients who have 'Sharma" in their names.            2

    (iii) To increase the cost of those tests in the table "TEST" by Rs.50.00 that have cost below Rs.200.00.                                 2
    [2+2+2+2+2=10]

    Marks:10
    Answer:

    (a) CREATE TABLE Inventory

    ( MaterialID Integer primary key,

    Material varchar(50) NOT NULL,

    Category Char,

    DatePurchase Date);

    (b) Primary key in table ‘Patient’ – PCODE

    Primary key in table ‘Test’ – TESTID

    Because fields, PCODE and TESTID will have distinct values in their respective tables.

    (c) (i)SELECT NAME,TESTID,TESTNAME FROM PATIENT P, TEST T WHERE P.TEST ID=T.TESTID;

    (ii)SELECT NAME,TESTNAME,COST FROM PATIENT P,TEST T WHERE P.TESTID=T.TESTID;

    (iii)SELECT COST+50 FROM TEST WHERE COST<200.00;

    View Answer
  • Q7

    (a)  How does e-governance help in building trust between the Government and citizens?   2

    (b)  How can e-learning help students learn at their own pace?                                            1

    (c)  Ms. Cathy is creating a form for Vidya University Sports Council application. Help her to choose the most appropriate controls from ListBox, ComboBox, TextField, TextArea, RadioButton, CheckBox, Label and Command Button for the following entries:                   2

    [2+1+2=5]

    S. No.

    Function

    1.

    To let the user enter NAME

    2.

    To let the user enter MOBILE NUMBER

    3.

    To let the user choose one PROFESSION out of the categories. Teaching/Non-Teaching/Research Scholar.

    4.

    To let the user select facilities out of Gym, Yoga, Table Tennis, Badminton and Aerobics. More than one facility may be chosen.

    Marks:5
    Answer:

    (a) With creation of online government portals which are accessible to anyone living in urban or remote areas has created a transparency between people and government in the working and policies of government thereby building trust between the Government and citizens.

    (b) E-learning is giving freedom to people to learn whatever they want to learn and whenever they want to learn irrespective of age, caste, gender, economical background etc.

    (c) 1. TextField

    2. TextField

    3. ComboBox

    4. CheckBox

     

    View Answer