Page 257 - PowerPoint Presentation
P. 257
CAVITE STATE UNIVERSITY
TRECE MARTIRES CITY CAMPUS
Department of Information Technology DCIT 111 - Advanced Programming
information, warning, and error). Each look and feel has its own versions of the four standard
icons.
QUIZ NO. 3: 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: _____
33