1 / 5

START

START. A. D ISPLAY “Minute vehicle left lot (0 - 59)?”. getVehicle ( vType ). D ISPLAY "Hour vehicle entered lot (0 - 23)?”. getNum (0, 59, m Out ). phOut = hOut pmOut = mOut. getNum (0, 23, hIn ). D ISPLAY “Minute vehicle entered lot (0 - 59)?”. mOut = mOut + 60

prince
Download Presentation

START

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. START A DISPLAY “Minute vehicle left lot (0 - 59)?” getVehicle(vType) DISPLAY "Hour vehicle entered lot (0 - 23)?” getNum(0, 59, mOut) phOut = hOut pmOut = mOut getNum(0, 23, hIn) DISPLAY “Minute vehicle entered lot (0 - 59)?” mOut = mOut + 60 hOut = hOut - 1 mOut < mIn TRUE FALSE getNum(0, 59, mIn) DISPLAY "Hour vehicle left lot (0 - 23)?” hDur = hOut - hIn mDur = mOut - mIn chargable = hDur getNum(0, 23, hOut) B A

  2. B mDur != 0 chargable = chargable + 1 TRUE FALSE chargable < 0 DISPLAY “Invalid times entered, the vehicle must arrive before it can leave” TRUE FALSE charge = 0 F vType DISPLAY “Data Entry Error” DEFAULT C B T G DISPLAY “PARKING LOT CHARGE” “Type of Vehicle: Car” DISPLAY “PARKING LOT CHARGE” “Type of Vehicle: Truck” DISPLAY “PARKING LOT CHARGE” “Type of Vehicle: Bus” C D E

  3. C D E chargable > 3 chargable > 1 FALSE FALSE TRUE TRUE charge = (chargable - 3) * 1.50 charge = (chargable - 1) * 3.70 + 2.00 charge = chargable * 2.00 chargable > 2 FALSE TRUE charge = (chargable - 2) * 2.30 + 2.00 charge = chargable * 1.00 G H

  4. F H DISPLAY “TIME IN“, hIn, “:”, mIn DISPLAY "TIME OUT”, phOut, “:”, pmOut DISPLAY "PARKING TIME”,, hDur, “:”, mDur DISPLAY "ROUNDED TOTAL“, chargable DISPLAY "TOTAL CHARGE “, charge STOP

  5. getNum(low, high, val) getVehicle(v) DISPLAY “Type of Vehicle?” GET val GET v val < low OR val > high v != ‘C’ AND v != ‘T’ AND v != ‘B’ DISPLAY “Number must be between:, low, “and”, high, “, please re-enter: “ DISPLAY “Invalid vehicle type enter C, B or T :“ GET val GET v STOP STOP

More Related