//Anthony Bahlman program 4
import javax.swing.JOptionPane;
public class kanokla
{
public static void main(String[] args)
{
String input, name,serv;
char type;
int accnum, daym, nightm, count, min;
input= "";
for (count = 1; count<= 5;count++)
{
input = JOptionPane.showInputDialog(null, "type R for Regular or P for Premium");
type = input.charAt(0);
while(type != 'R'|| type != 'r' && type != 'P' || type != 'p')
{
input = JOptionPane.showInputDialog(null, "please type R for Regular or P for Premium try again");
type = input.charAt(0);
}
if(type == 'R' || type == 'r')
{
input = JOptionPane.showInputDialog(null, "minutes:");
min = Integer.parseInt(input);
}
else
{
input = JOptionPane.showInputDialog(null, "minutes in the day:");
daym = Integer.parseInt(input);
input = JOptionPane.showInputDialog(null, "minutes in the night:");
nightm = Integer.parseInt(input);
}
}
}
}
import javax.swing.JOptionPane;
public class kanokla
{
public static void main(String[] args)
{
String input, name,serv;
char type;
int accnum, daym, nightm, count, min;
input= "";
for (count = 1; count<= 5;count++)
{
input = JOptionPane.showInputDialog(null, "type R for Regular or P for Premium");
type = input.charAt(0);
while(type != 'R'|| type != 'r' && type != 'P' || type != 'p')
{
input = JOptionPane.showInputDialog(null, "please type R for Regular or P for Premium try again");
type = input.charAt(0);
}
if(type == 'R' || type == 'r')
{
input = JOptionPane.showInputDialog(null, "minutes:");
min = Integer.parseInt(input);
}
else
{
input = JOptionPane.showInputDialog(null, "minutes in the day:");
daym = Integer.parseInt(input);
input = JOptionPane.showInputDialog(null, "minutes in the night:");
nightm = Integer.parseInt(input);
}
}
}
}