Page 194 - PowerPoint Presentation
P. 194

CAVITE STATE UNIVERSITY
                               T3 CAMPUS
                               Department of Information Technology          COSC 65 – Programming Languages

               information, warning, and error). Each look and feel has its own versions of the four standard
               icons.


               QUIZ NO. 6 | Hardcoding: Write 2 separate programs on a piece of paper applying the 2
               Java Classes such as (1) Scanner and (2) BufferedReader & InputStreamReader and then
               the computer will ask the user to enter two numbers and then the user will have to choose
               what arithmetic operation to choose.
               Note: You can choose either If-else statement or switch statement.

               Sample Output for Scanner class and BufferedReader & InputStreamReader
                  Hello this program is using Scanner Class


                  Please enter the first number: ____
                  Please enter the second number: ____

                  Here’s the list of operations that you can use:
                  + for Addition
                  -  for Subtraction
                  * for Multiplication
                  / for Division

                  Choose one: ___
                  Okay, you chose Addition.

                  The Sum of the two numbers is: _____






























                                                                                                 Page | 53
   189   190   191   192   193   194   195   196   197   198   199