Page 70 - IP
P. 70

(g) ABC School uses the following interface built in java to check the eligibility of a student for a particular

           stream from science, commerce and humanities. The user first enters the total percentage and selects the
           desired stream by selecting the appropriate option button. An additional 5% is marks is given to students of

           NCC.


                                                         Write Java Code for the following

                                                         a)  On the Action event of the close button the application
                                                         gets closed.                                                                                          1
                                                         b)  On the Action event of the clear button all the text fields
                                                         and the check boxes get cleared. 1


                                                                     c)    On  Action  event  of  the  button  ‘Calc

                                                         Percentage’ Net percentage of the student is calculated and
                                                         displayed  in  the  appropriate  text  filed.  Net  percentage  is

                                                         same as that of the actual percentage if the student doesn’t

                                                         opts for NCC otherwise 5% is added to actual percentage.                                              2
                                                         d)  On Action Event of the button ‘Result’, the application
                                                         checks the eligibility of the students.

                         And display result “ in the appropriate text field. Minimum percentage for science is 70, for
                         commerce 60 and  for humanities 40.                                                   2



                5.(a) How can you remove the column of a table? Explain with example.                               2

                 (b) What are TCL commands? Explain the role of Commit and Rollback with example.                 2


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


                          ID       Name             Dept              Gende     Experienc    ConstFe
                                                                      r         e            e
                          201      R.K. Nath        ENT               M         12           300
                          457      Mahavir          SKIN              M                      500
                                   Singh
                          365      M. Asthana       MEDICINE          F         9            250
                          221      V. S. Nag        ENT               M         3            150
                          122      S. P. Sinha      NEPHRO            F                      200
                          110      J. P. Pandey     CARDIOLOG         M         9            500
                                                    Y
   65   66   67   68   69   70   71   72   73   74   75