Question: Program Description Follow the requirements below to write a program that will calculate the cost of self - defense lessons based on different types of
Program Description
Follow the requirements below to write a program that will calculate the cost of selfdefense lessons based on different
types of memberships
Write a method that presents the user with the choices to enter their membership type. The method must
ask the user to enter a selection of one of three types of membership Puncher or Brawler Input
Validation: The program must only accept one of the valid types of memberships. If the user's input is not
valid, the method must force the user to reenter until a valid value is entered. This method must not
valid, the method must force the user to reenter until a valid value is entered. This method must not aciple
any arguments. The method must return a validated membership type. See the Sample Run Videos.
Write a method that accepts one argument: the membership type. The method must return the base cost
of the membership. The base cost of the membership can be determined by using the following table
below:
below:
Write a method that accepts one argument: the membership type. The method must return the maximum
free selfdefense lessons that are included in the membership. The maximum free selfdefense sessions
Write a method that accepts one argument: the membership type. The method must return the hourly rate
for selfdefense lessons for each membership. The hourly rate for selfdefense lessons in each
membership can be determined using the information below
Write a method that gets the input of the number of hours a user desires to book for a selfdefense lesson.
When called, the method must accept the following arguments: the membership type, the remaining free
sessions in the membership, and the hourly rate for the membership. The method must prompt the use
for the number of hours desired to book for a lesson and validate the input of the hours so that between
and hours must be entered for a lesson. The method must return the validated number of hours entered.
See the Sample Run Videos
Write a method that displays information about the customer's membership. When called, this method must
accept the following arguments: the membership type, the number of free sessions included in the
membership, the hourly rate for selfdefense lessons, and the base cost of the membership. This
method must use the arguments to display the information about the membership when called. See the
Sample Run Videos.
Write a method that displays a final invoice for a customer's membership along with included selfdefense
lesson fees. When called, this method must accept the following arguments: membership base cost, the
the
Videos.
Write a method that calculates the price of a single selfdefense lesson. This method must accept the
following arguments: the remaining free lessons in the membership, the hourly rate for the
membership, and the number of hours booked for the selfdefense lesson. The method must return
the calculated price of the lesson. Note: the calculation is not provided. You must create the calculation.
Hint: you will also need to account for the included free sessions in the membership in your calculations
When the program runs, it must do the following operations by calling methods from main:
Call the appropriate method to get the input of the membership type, then set the following: the
included free lessons, membership base cost, and the hourly rate for a session by calling the
appropriate methods.
Call the appropriate method to display information about the user's Selfdefense Lesson
Membership
Use a loop to ask the user if they would like to enter information to book a selfdefense lesson;
If so call the appropriate method to get the input of the hours for the session
Then, calculate the selfdefense lesson cost using the appropriate method
Then, continuously request the input of more selfdefense lessons and keep
processing until the user chooses to stop.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
