+ I/ V * 00 C. SI ES 1083: Intradu Online Java Comoiler Online terpreting anexpected enr X Gstarting line of code in java C x + A learn.zybooks.com/zybook/UTSACS1083Fal|2021/chapter/8/section/11 y Scout Troop 79.. O Schoology > Watch Anime Onlin... Crunchyroll - Watch... Twitter a Amazon.com Content My library > CS 1083: Introduction to Programming I for Computer Scientists home > 8.11: LAB: Toll calculation E zyBooks catalog ?Help 8.11 LAB: Toll calculation Toll roads have different fees based on the time of day and on weekends. Write a method calcToll() that has three parameters: the current hour of time (int), whether the time is morning (boolean), and whether the day is a weekend (boolean). The method returns the correct toll fee (double), based on the chart below. Weekday Tolls • Before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) • 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) Starting 8:00 pm ($1.40) Weekend Tolls • Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The method calls below, with the given arguments, will retn the following toll fees: calcToll(8, true, false) returns 2.95 calcToll(1, false, false) returns 1.90 calcToll(3, false, true) returns 2.15 calcToll(5, true, true) returns 1.05 Delete PrtSc Insert F12 F11 F10 F8 F7 F5 +D Backspace & 23 6. 5. 9. 3. 4. 2. G K. H + I/ | 1 * 00 44R oks.com/zybook/UTSACS1083Fall2021/chapter/8/section/11 Watch Anime Onlin... Crunchyroll- Watch... Twitter Content ry > CS 1083: Introduction to Programming I for Computer Scientists home > B: Toll calculation E zyBooks catalog ?Help LAB 8.11.1: LAB: Toll calculation 0/10 ACTIVITY LabProgram.java Load default template... 1 public class LabProgram { 2 3. public static double calcToll(int hour, boolean isMorning, boolean isWeekend) { /* Type your code here. */ 4. { public static void main(String[] args) { System.out.println(calcToll(8, true, false)); System.out.println(calcToll(1, false, false)); System.out. println(calcToll(3, false, true)); System.out.println(calcToll(5, true, true)); 7. 9. 11 曲 12 Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the Develop mode Submit mode second box. Enter program input (optional) Insert Delete PrtSc 同回 F10 F11 F12 因 小 F5 Backspace & 6. 7. 5. %3D H. K.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
+ I/
V
* 00
C.
SI
ES 1083: Intradu
Online Java Comoiler Online
terpreting anexpected enr X
Gstarting line of code in java C x +
A learn.zybooks.com/zybook/UTSACS1083Fal|2021/chapter/8/section/11
y Scout Troop 79..
O Schoology
> Watch Anime Onlin...
Crunchyroll - Watch...
Twitter
a Amazon.com
Content
My library > CS 1083: Introduction to Programming I for Computer Scientists home >
8.11: LAB: Toll calculation
E zyBooks catalog
?Help
8.11 LAB: Toll calculation
Toll roads have different fees based on the time of day and on weekends. Write a method calcToll() that has three parameters: the current
hour of time (int), whether the time is morning (boolean), and whether the day is a weekend (boolean). The method returns the correct toll
fee (double), based on the chart below.
Weekday Tolls
• Before 7:00 am ($1.15)
7:00 am to 9:59 am ($2.95)
• 10:00 am to 2:59 pm ($1.90)
3:00 pm to 7:59 pm ($3.95)
Starting 8:00 pm ($1.40)
Weekend Tolls
• Before 7:00 am ($1.05)
7:00 am to 7:59 pm ($2.15)
Starting 8:00 pm ($1.10)
Ex: The method calls below, with the given arguments, will retn the following toll fees:
calcToll(8, true, false) returns 2.95
calcToll(1, false, false) returns 1.90
calcToll(3, false, true) returns 2.15
calcToll(5, true, true) returns 1.05
Delete
PrtSc
Insert
F12
F11
F10
F8
F7
F5
+D
Backspace
&
23
6.
5.
9.
3.
4.
2.
G
K.
H
Transcribed Image Text:+ I/ V * 00 C. SI ES 1083: Intradu Online Java Comoiler Online terpreting anexpected enr X Gstarting line of code in java C x + A learn.zybooks.com/zybook/UTSACS1083Fal|2021/chapter/8/section/11 y Scout Troop 79.. O Schoology > Watch Anime Onlin... Crunchyroll - Watch... Twitter a Amazon.com Content My library > CS 1083: Introduction to Programming I for Computer Scientists home > 8.11: LAB: Toll calculation E zyBooks catalog ?Help 8.11 LAB: Toll calculation Toll roads have different fees based on the time of day and on weekends. Write a method calcToll() that has three parameters: the current hour of time (int), whether the time is morning (boolean), and whether the day is a weekend (boolean). The method returns the correct toll fee (double), based on the chart below. Weekday Tolls • Before 7:00 am ($1.15) 7:00 am to 9:59 am ($2.95) • 10:00 am to 2:59 pm ($1.90) 3:00 pm to 7:59 pm ($3.95) Starting 8:00 pm ($1.40) Weekend Tolls • Before 7:00 am ($1.05) 7:00 am to 7:59 pm ($2.15) Starting 8:00 pm ($1.10) Ex: The method calls below, with the given arguments, will retn the following toll fees: calcToll(8, true, false) returns 2.95 calcToll(1, false, false) returns 1.90 calcToll(3, false, true) returns 2.15 calcToll(5, true, true) returns 1.05 Delete PrtSc Insert F12 F11 F10 F8 F7 F5 +D Backspace & 23 6. 5. 9. 3. 4. 2. G K. H
+ I/
| 1
* 00
44R
oks.com/zybook/UTSACS1083Fall2021/chapter/8/section/11
Watch Anime Onlin... Crunchyroll- Watch...
Twitter
Content
ry > CS 1083: Introduction to Programming I for Computer Scientists home >
B: Toll calculation
E zyBooks catalog
?Help
LAB
8.11.1: LAB: Toll calculation
0/10
ACTIVITY
LabProgram.java
Load default template...
1 public class LabProgram {
2
3.
public static double calcToll(int hour, boolean isMorning, boolean isWeekend) {
/* Type your code here. */
4.
{
public static void main(String[] args) {
System.out.println(calcToll(8, true, false));
System.out.println(calcToll(1, false, false));
System.out. println(calcToll(3, false, true));
System.out.println(calcToll(5, true, true));
7.
9.
11
曲
12
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
Develop mode
Submit mode
second box.
Enter program input (optional)
Insert
Delete
PrtSc
同回
F10
F11
F12
因
小
F5
Backspace
&
6.
7.
5.
%3D
H.
K.
Transcribed Image Text:+ I/ | 1 * 00 44R oks.com/zybook/UTSACS1083Fall2021/chapter/8/section/11 Watch Anime Onlin... Crunchyroll- Watch... Twitter Content ry > CS 1083: Introduction to Programming I for Computer Scientists home > B: Toll calculation E zyBooks catalog ?Help LAB 8.11.1: LAB: Toll calculation 0/10 ACTIVITY LabProgram.java Load default template... 1 public class LabProgram { 2 3. public static double calcToll(int hour, boolean isMorning, boolean isWeekend) { /* Type your code here. */ 4. { public static void main(String[] args) { System.out.println(calcToll(8, true, false)); System.out.println(calcToll(1, false, false)); System.out. println(calcToll(3, false, true)); System.out.println(calcToll(5, true, true)); 7. 9. 11 曲 12 Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the Develop mode Submit mode second box. Enter program input (optional) Insert Delete PrtSc 同回 F10 F11 F12 因 小 F5 Backspace & 6. 7. 5. %3D H. K.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY