Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions