Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

slove this code in c++ Toll reads hrve difterent fees at different times of the day and on weekends. Write a function CalcTolln that has

slove this code in c++
image text in transcribed
image text in transcribed
Toll reads hrve difterent fees at different times of the day and on weekends. Write a function CalcTolln that has three arguments the curert hour of sime (int) whether the time is morning (bool), and whether the day is a weekend (bool). The function retume the correct tor fee (double), based on the chart below Weekday Tolls - Before 700 am (881 15) - 7.00 am to 9.59 am (\$2.95) - 1000 am 10259 om (\$1.90) - 300 pm to 759 pm ($395) - Starting 8000pm($140) Weekend Tolls - Betore 7.00 am (\$1.05) - 700 am to 759 pm ($2.15) - Starting Bo0 pm(\$1 10) Ex. The function calls below, with the given arguments, will return the following toll fees. CateToll(8, toue, fatse) refurns 2.95 Calctoll(1, false faise) retums 1.90 Caletolis, false true) returns 2.15. Calctolif. tive, true) retum3 1.05 1 \#include 2 *include

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions