Question
Write a java program. The cost to join a gym is: 1) Senior citizens: get a 30% discount. 2.) If twelve or more months in
Write a java program. The cost to join a gym is:
1) Senior citizens: get a 30% discount. 2.) If twelve or more months in advance are bought and paid for, a 15% discount is applied to the membership. The user enters the number of months. 3) Personal Training sessions: 20% discount on each session if more than 12 are bought.
This will be a menu-driven, GUI program that determines the cost of a new membership.Using JTextField for input and JLabel to describe what you want the user to input and buttons (calculate and exit). -Senior Discount - The user chooses 0 or 1, yes or no, for senior. -The user enters the number of months for membership. -The user enters the number of personal training sessions.
Program needs the following methods: a. A method that displays general info about the gym and the charges using a JTextField Membership cost: $400 Cost per training session: $70 per person List the discounts in this space
b. A method the gets all the information to determine the membership cost.
c. A method to determine the membership cost.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started