Description of this paper

JAVA CODE

Description

solution


Question

My instructor told me to add JOptionPne and some input(ex. timeIn, timeOut), have to use the test data for this program(see attached document).;please check an attached document for instruction.;Here is what I have so far...;import java.util.Formatter;class ParkingRate;public static void main(String[] args);//Variable Declaration;int timeIn;int timeOut;float miles,time,mRate,pRate,total;timeIn = in;timeOut = out;pRate = 1.5f;miles = mil;if(miles>=0 && miles =501 && miles =1001 && miles =1501 && miles =2001 && miles<=3000);mRate = 225+(6*(miles-2000));else;mRate = 285+(5*(miles-3000));Formatter f = new Formatter();f.format("compensation for mileage:%5.2f",(miles * mRate));System.out.print(f);f = new Formatter();total = miles * mRate+((timeOut-timeIn)/100) * pRate;f.format("total compensation:%5.2 f",total);System.out.print(f)

 

Paper#69062 | Written in 18-Jul-2015

Price : $22
SiteLock