Page 78 - IP
P. 78

perTF respectively.  (Assume that the marks in each semester are out of
                              600)                                                             2
                       b)     When the user clicks on the button Report, the final report should be
                              displayed in the repLbl in the following format :                2
                                                                 Total marks = … and percentage = … %
                       c)     Upon clicking the Reset Form button, the form should get cleared.  2

               4.2 Rewrite the following code using a for loop :                                      2
                        int i=1, sum=0;
                         while (i<10)
                         {
                          sum+=i;
                          i+=2;
                         }
               4.3 What will be the contents of jTextfield1 and jTextfield2 after executing the
               following code:                                                                        2
                       String  s=”Information Technology”

                       jTextField1.setText(s.Length()+”  “ +s.substring(s,3,5));
                       jTextField2.setText(Math.pow(2,3)+“ ” +Math.ceil(89.23));

               4.4 What is the output of the following code, if the value of variable k is 10? 1
                       int result = ++k + k++ + k ;
                       System.out.println ( result ) ;

               4.5     Write a program in JAVA to input a number in jTextField1 and calculate its
                       factorial.                                                                     2

               4.6  Write the HTML code for the following :                                           2
               a) Heading with font size=12 and colour=Red

               b) z= x  + y 2
                      3
                                                         Section C

               Q – 5 Study the following tables Doctor and Salary and write SQL Commands
                                                                                               [1x5=5]
                                                                          Table  : DOCTOR
                         ID          NAME              DEPT                SEX             EXPERIENCE
                         101         John              ENT                 M               12
                         104         Smith             ORRHPEDIC           M               5
                         107         George            CARDIOLOGY          M               10
                         114         Lara              SKIN                F               3
                         109         K George          MEDICINE            F               9
                         105         Johnson           ORRHPEDIC           M               10
                         117         Lucy              ENT                 F               3
                         111         Bill              MEDICINE            F               12
                         130         Morphy            ORRHPEDIC           M               15
                                                     Table  : SALARY
   73   74   75   76   77   78   79   80   81   82   83