Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this needs to run in Eclipse Java Photon Unit Test In-class Lab Problem Statement A parking garage charges a $2.00 minimum fee to park for

this needs to run in Eclipse Java Photon

Unit Test In-class Lab Problem Statement A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour of part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours. Lab Activity Objective: Practice the test-first methodology using JUnit to perform unit testing. Pre-lab activities: If you havent already, download and install the latest version of Eclipse. Activities: 1. Create a ParkingCharges class with a calcParkingCharges() method.

a. Create a Junit test to validate minimum charge.

b. Configure calcParkingCharges() to return the minimum charge (hours <= 3).

c. Add a statement/statements to the Junit test to validate charges between the minimum and maximum charges.

d. Configure calcParkingCharges() to return charges between the minimum and maximum charge.

e. Add a statement/statements to the Junit test to validate maximum charge.

f. Configure calcParkingCharges() to return the maximum charge.

2. Create a ParkingChargesApp class that calculates and displays the parking charges for each customer who parked in the garage and displays the running total of the days receipts.

a. Enter the hours parked.

b. Display the charges for this customer.

c. Display the running total.

d. Continue as long as there is another customer.

this needs to run in Eclipse Java Photon

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

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions