Question: Suppose that you are going to implement a method to determine the membership fees for a customer at a community gym, with the following header:

Suppose that you are going to implement a method to determine the membership fees for a customer at a community gym, with the following header:
public static int membershipFees(int age, boolean employed)
The membership fees depend on the age of the customer. If the customer is less than 6 years old, the fees are 0. If the customer is between 6 and 11 years old inclusively, the fee is 20 dollars. If the customer is between 12 and 17 years old inclusively, the fee is 40 dollars. If the customer is 18 years or older, the fee is 80 dollars if they are employed and 60 dollars if they are not employed. For customers, below 18, their employment status does not matter.
Before you implement this method, you are going to write a set of Junit test cases that thoroughly tests this method. I claim that you need at least 7 different test cases.
Give 7 different cases by which you will test the code to be reasonably certain that it is correct. You do not need to write code. You need only give the inputs that you would choose to test the code. Also briefly explain why you choose these inputs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!