Java Quiz 1 Laboratory Exercise
Java Quiz 1 Laboratory Exercise
Java Quiz 1 Laboratory Exercise
Instructions:
1. Create a program that will display your full name, course and section, and the statement Hello World.
Enclosed the in Asterisk. (See image of the sample output).
2. You cannot use \n to generate a new line however you can use \t to generate a tab.
3. Save your file as FirstActivity.java
4. Take a snippet/screenshot of your output.
5. Upload your source code (.java) and snippet/screenshot in the Google Classroom.
Hint: You can use as many escape characters (\t only) as you want.
Laboratory Activity No. 2 (Quiz 1) (15 points)
Instructions:
1. Create a program that will convert seconds into HOUR:MINUTES:SECONDS.
2. Name your class as SecondActivity.
3. See the sample Output.
4. Save your file as SecondActivity.java
5. Take screenshots of your sample output (at least 4), for the user input enter any value you desired.
SPECIFICATIONS
1:35:10
1 is for hour, 35 is for minutes, 10 is for seconds
Hint: You can use either readLine() or showInputDialog() methods; Use mathematical operators to solve this
problem.
Sample output 1.
Enter your name: Ma. Melanie Cruz
Enter seconds: 3600
Sample output 2.
Enter your name: Maxeen
Enter seconds: 2333
Sample output 3.
Enter your name: Fawziya
Enter seconds: 350
Sample output 4.
Enter your name: Jessie
Enter seconds: 30
Instructions:
6. Create a program that will compute for the salary of an Employee.
7. Name your class as ThirdActivity.
8. See the sample Output.
9. Save your file as ThirdActivity.java
10. Take screenshots of your sample output (at least 4), for the user input enter any value you desired.
SPECIFICATIONS
Job Rate
Hint: You can use either readLine() or showInputDialog() methods; You can use any control statement you want (If
Else if Else, Cascading If, Switch).
Sample output 1.
Enter your name: Ma. Melanie Cruz
Menu
Sample output 2.
Enter your name: Fawziya
Menu
[1] Network Engineer
[2] Software Engineer
[3] Full Stack Developer
[4] Technical Support
Hello Fawziya!
Your job salary as a Network Engineer is 1200 per hour.
Your gross salary for this week is 48000.
Your net salary for this week is 42240.