Question: Hello there , I need help w/ my assignment. Clear answers Plz. COMP 1900perin Lab 6 Homework: User Fall 2018 Number of People: Individual rk:User-Defined
COMP 1900perin Lab 6 Homework: User Fall 2018 Number of People: Individual rk:User-Defined Methods (1s pts) Grader Please refer to the COMP 1900 syllabus for TA Use camelCase for variable names, consistent Within the 1900 folder on your desktop, create a new folder Due: By the beginning of next week's lab session your lab TA. Questions about grading? Contact him/her first The tise Consistent indentation in your code, and include a reasonable may deduct points for poor coding style 1. (10 pts) As indicated at following pricing schedule for in s. Memphis International Airport uses the their short-term parkins Par King tene Time First 30 minutes Pricing $2.00 $1.00 $24.00 24-hour maximum Within your Lab6HW folder, static int parkingCharge(int returns the appropriate short-term UP to the next half-hour- for example, parking make it $3. After all, they want to make as much money as possi create a new file named AirportParking.java. Write a method publie minutes) that takes a parameter for the number of minutes parked and parking charge, in dollars. Assume that the airport will always round exactly 60 minutes would cost $2, but 61 minutes would If the method is called with a zero or with an argument exceeding 24 hours, the 24-hour maximum charge should be applied to each complete day, and any partial day should be charged according to the schedule in the table. For example, parking for 1471 minutes would result in a charge of $26. The first 1440 minutes (24 hours) costs $24, the next 30 minutes is free, and the next 1 minute costs $2. negative argument, make it return zero. If the method is called Hint; Start by determining three things - 1) how long it takes to reach the 24-hour maximum charge (it SNOT 24 hours), 2) how many full days are contained in the argument, and 3) how many 30-minute increments are contained in the partial day that's left over Within the same AirportParking-java file, write a main method that repeatedly asks the user to nutes parked, your main method should call the previously written enter the number of minutes parked, until entering a negative sentinel enters a number of mi parkingCharge method and display the value returned. Your parkingCharge method gets this information from its value to exit. Each time the user 2. (5 pts) input. The main method is the only one that should create a Scanner object and read user
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
