You are on page 1of 1

import javax.swing.

JOptionPane;

public class FitnessReginaCameron {


//Regina Cameron

public static void main(System[] args) {

String upperCaseMemberID = JOptionPane.showInputDialog("Please enter your


member ID number: ");
String sub1 = upperCaseMemberID.substring(0,1);
String sub2 = upperCaseMemberID.substring(2,4);
String sub3 = upperCaseMemberID.substring(5);
//// breaking out the number of member id for format after the information
has been provided by the user

// Requesting member ID number

m
er as
String total_Time = JOptionPane.showInputDialog(" Please enter your massage

co
time length: ");

eH w
// Requesting massage time

o.
rs e
ou urc
// Convert time string into numeric and perform time calculation
final int HOURS = 60;
int convert_Time = Integer.parseInt(total_Time);
int convert_Hours = convert_Time/HOURS;
o

int minutes = convert_Time%HOURS;


aC s
vi y re

//output message
JOptionPane.showMessageDialog(null,"Thank you, "+ sub1 + "-" + sub2 + " -" +
sub3 + " your massage will take approximately " + convert_Hours + " hour and " +
minutes + " minutes.");
ed d

System.exit(minutes);
ar stu
is
Th
sh

}
}

This study source was downloaded by 100000770193558 from CourseHero.com on 04-17-2021 03:53:35 GMT -05:00

https://www.coursehero.com/file/58225250/Fitnessjava/
Powered by TCPDF (www.tcpdf.org)

You might also like