Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am only given one hour to code this. [NOTE : NO arrays, pointers, recursion and strings should be used in this code.] 1) How

image text in transcribed

image text in transcribed

I am only given one hour to code this. [NOTE : NO arrays, pointers, recursion and strings should be used in this code.] 1) How do I go about doing this is under an hour? Please include some thought processes. 2) What's the best way to savage the maximum amount of marks if I don't complete this in under an hour?

[50 marks] Exercise 1: Parking Fee Problem Statement Mr. Wu has been going to work every day by taxi for many years. However, the taxi fare has been increasing rather quickly in recent years. Therefore, he is considering driving to work instead One of the costs for driving is the parking fee. The parking rates of the car park at Mr Wu's workplace are as shown in the table below Weekday 2.00 per hour 51.20 per 30 minutes $5.00 per entry Saturday 2.50 per hour 51.50 per 30 minutes $7.00 per entry Sunday 5.00 per entry 4am7am 6pmmidnight erl rate: 1- The car park cpens at 4am and doses at midnight. All vehicles must leav by midnight. 2. There is a grace period of 10 minutes on any day (e., it is completely free to park for 3. 4. 10 minutes or less regardless of day and time.l There is a 10% surcharge far parking more than 10 hours on a weekday and 20% for Saturday. There is no surcharge for Sunday. There is an additional 53.00 fee for exiting after 10pm on any day. (Surcharge is not applicable on this fee. Here are a few examples on how the total fee is calculated Example 1: Tuesday, 4:29am to 7:50am. 1:29am to 7am is charged as 3 1-hour slots: $2.00 3 $6.00 7am to 7:50am is charged as 2 30-minute slats: $1.20 2 = $2.40 Total fee: $6.00 + $2.40 = $8.40 Example 2: Saturday, 7:01am to 7:49pm. 7:01 ism to 6pm is charged as 22 30-minute slots: $1.50 6pm to 7:49pm is charged as cme entry: $7.00 20% surcharge far parking more than 10 hours: l$33.00 + $7.00)" 20%-$8.00 Total fee $33.C0 $7.00 $8.00-$48.00 22 = $33.00 Example 3: Sunday, 3pm to 10:01pm. 3pm tn 10:01pn is charged as ae entry: $5.00 . Additional fee for exiting after 10pm: 53.00 Total fee-$5.00 $3.00-$8.00 Example 4: Thursday, 11:49pm to 11:59pm. .Grace period Total fee So.cO Example 5: Monday, 12pm to 10:01pm. 12pm to 6pm is charged as 12 30-minute slots: $1.20 12-14.40 6pm to 10:01pm is charged as one entry: $5.00 10% = $1.94 10% surcharge far parking more than 10 hours: IS 14.40 + $5.00 Addditianal fee for exiting after 10p: $3.00 Total fee $14.40 $5.00$1.94$3.00 524.34

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

Step: 3

blur-text-image

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 Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions