Question: step by step Create a new Eclipse project named LabSLastnameFirstname All.of this lab's programs should be in the same project 1. (2 pts) Within a


step by step
Create a new Eclipse project named LabSLastnameFirstname All.of this lab's programs should be in the same project 1. (2 pts) Within a new class named Factorial, write a method that retums the factorial of a number. The method should take one int parameter and use a loop to compute the factorial Remember that the factorial of a positive integer n (written as n) is defined as the product of all integers from 1 up to n For example, 4! is 4 x 3 x 2 x 1 or 24. If your method is called with a zero or negative argument, just return 1 2. (2 pts) Within the same Factorial class, write a main method that gets user imput for an integer, calls your factorial method using that integer as an argument, and prints the return value. 3. (6 pts) As indicated at http//www flymemphis.com/parking, Memphis International Airport uses the following pricing schedule for their short-term parking fees Time First 30 minutes 31 to 60 minutes Each additional 30 minutes 24 bour maximum Pricing FREE $2.00 1.00 $24.00 Within a new class named Parking, write a method that takes a parameter for the number of minutes parked (you can assume it's a whole number) and returns the appropriate short-term parking charge, in dollars. Assume that the airport will always round UP to the next half hour for example, parking exactly 60 minutes would cost $2, but 61 minutes would make it S3 After all, they want to make as much money as possible If the method is called with a zero or negative argument, make it return zero. If the method is called with an argument exceeding 24 hours, the 24-hour maximum listed in the table 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 S26 The first 1440 minutes (24 hours) cost S24, the next 30 minutes is free, and the next 1 mnute costs $2 the same Parking class, write a main method that makes at least six calls to your parking method using different arguments and prints the return value from each call. Test a wide range of values
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
