a =Integer.parseInt(JOptionPane.showInputDialog("Choices: \n\t\t[1]-Daily Newspaper\n\t\t[2]-Weekly Newspaper\nChoose the kind of newspaper you want to reserve?: "));
while(a>2||a<1)
{
a =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice!\n Please choose from the following only. \n 1-Daily Newspaper, 2-Weekly Newspaper \nChoose the kind of newspaper you want to reserve?: "));
}
if(a==1)
{
b =Integer.parseInt(JOptionPane.showInputDialog("-----------DAILY NEWSPAPER-----------\n\n\t\tChoices: \n\t\t[1]-Manila Bulletin\n\t\t[2]-Daily Inquirer\n\t\t[3]-Philippine Star\n\t\tChoose the type of newspaper you want to reserve?: "));
while(b>3||b<1)
{
b =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice! \n Please choose from the following only.\n\t\t[1]-Manila Bulletin\n\t\t[2]-Daily Inquirer\n\t\t[3]-Philippine Star\n\t\tChoose the type of newspaper you want to reserve?: "));
}
switch(b)
{
case1:
{
c =Integer.parseInt(JOptionPane.showInputDialog("-----------MANILA BULLETIN-----------\nChoose from the following days:\n\t\t\t[1]-Monday\n\t\t\t[2]-Tuesday\n\t\t\t[3]-Wednesday\n\t\t\t[4]-Thursday\n\t\t\t[5]-Friday\n\t\t\t[6]-Saturday\n\t\t\t[7]-Sunday\nChoose the day of the newspaper you want to reserve?: "));
while(c>7||c<1)
{
c =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice!\nPlease choose from the following only.\n\t\t\t[1]-Monday\n\t\t\t[2]-Tuesday\n\t\t\t[3]-Wednesday\n\t\t\t[4]-Thursday\n\t\t\t[5]-Friday\n\t\t\t[6]-Saturday\n\t\t\t[7]-Sunday\nChoose the day of the newspaper you want to reserve?: "));
}
if(d==0)
{
e =Integer.parseInt(JOptionPane.showInputDialog("Choices:\n\t\t\t[1]-Yes\n\t\t\t[2]-No\nDo you really want to reserve the newspaper?: "));
if(e==1)
{
d=d+1;
JOptionPane.showMessageDialog(null,"Kindly fill-up the needed information:");
JOptionPane.showMessageDialog(null,"Thank You,"+f+" of "+h+" from school year "+"["+g+"]"+" You have succesfully reserved the newspaper,");
}
}
break;
}
case2:
{
c =Integer.parseInt(JOptionPane.showInputDialog("-----------DAILY INQUIRER----------- \nChoose from the following days:\n\t\t\t[1]-Monday\n\t\t\t[2]-Tuesday\n\t\t\t[3]-Wednesday\n\t\t\t[4]-Thursday\n\t\t\t[5]-Friday\n\t\t\t[6]-Saturday\n\t\t\t[7]-Sunday\nChoose the day of the newspaper you want to reserve?: "));
while(c>7||c<1)
{
c =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice!\nPlease choose from the following only\n\t\t\t[1]-Monday\n\t\t\t[2]-Tuesday\n\t\t\t[3]-Wednesday\n\t\t\t[4]-Thursday\n\t\t\t[5]-Friday\n\t\t\t[6]-Saturday\n\t\t\t[7]-Sunday.\nChoose the day of the newspaper you want to reserve?: "));
}
if(d==0)
{
e =Integer.parseInt(JOptionPane.showInputDialog("Choices:\n\t\t\t[1]-Yes\n\t\t\t[2]-No\nDo you really want to reserve the newspaper?: "));
if(e==1)
{
d=d+1;
JOptionPane.showMessageDialog(null,"Kindly fill-up the needed information:");
JOptionPane.showMessageDialog(null,"Thank You,"+f+" of "+h+" from school year "+"["+g+"]"+" You have succesfully reserved the newspaper,");
}
}
break;
}
case3:
{
c =Integer.parseInt(JOptionPane.showInputDialog("-----------PHILIPPINE STAR-----------\nChoose from the following days:\n\t\t\t[1]-Monday\n\t\t\t[2]-Tuesday\n\t\t\t[3]-Wednesday\n\t\t\t[4]-Thursday\n\t\t\t[5]-Friday\n\t\t\t[6]-Saturday\n\t\t\t[7]-Sunday \nChoose the day of the newspaper you want to reserve?: "));
while(c>7||c<1)
{
c =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice!\nPlease choose from the following only\n\n\t\t\t[1]-Monday\n\t\t\t[2]-Tuesday\n\t\t\t[3]-Wednesday\n\t\t\t[4]-Thursday\n\t\t\t[5]-Friday\n\t\t\t[6]-Saturday\n\t\t\t[7]-Sunday\nChoose the day of the newspaper you want to reserve?: "));
}
if(d==0)
{
e =Integer.parseInt(JOptionPane.showInputDialog("Choices:\n\t\t\t[1]-Yes\n\t\t\t[2]-No\nDo you really want to reserve the newspaper?: "));
if(e==1)
{
d=d+1;
JOptionPane.showMessageDialog(null,"Kindly fill-up the needed information:");
JOptionPane.showMessageDialog(null,"Thank You,"+f+" of "+h+" from school year "+"["+g+"]"+" You have succesfully reserved the newspaper,");
}
}
break;
}
}//switch
}//if
if(a==2)
{
b =Integer.parseInt(JOptionPane.showInputDialog("-----------WEEKLY NEWSPAPER----------- \nChoices: \n\t\t\t[1]-Cordillera Today\n\t\t\t[2]-Midland Courier\nChoose the type of newspaper you want to reserve?: "));
while(b>2||b<1)
{
b =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice! \n Please choose from the following only. \n\t\t\t[1]-Cordillera Today\n\t\t\t[2]-Midland Courier\nChoose the type of newspaper you want to reserve?: "));
}
switch(a)
{
case1:
{
c =Integer.parseInt(JOptionPane.showInputDialog("-----------CORDILLERA TODAY----------- \nChoose from the following weeks: \n\t\t\t[1]-Week 1\n\t\t\t[2]-Week 2\n\t\t\t[3]-Week 3\n\t\t\t[4]-Week 4\nChoose the week of the newspaper you want to reserve?: "));
while(c>4||c<1)
{
c =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice!\nPlease choose from the following only.\n\t\t\t[1]-Week 1\n\t\t\t[2]-Week 2\n\t\t\t[3]-Week 3\n\t\t\t[4]-Week 4\nChoose the week of the newspaper you want to reserve?: "));
}
if(d==0)
{
e =Integer.parseInt(JOptionPane.showInputDialog("Choices:\n\t\t\t[1]-Yes\n\t\t\t[2]-No\nDo you really want to reserve the newspaper?: "));
if(e==1)
{
d=d+1;
JOptionPane.showMessageDialog(null,"Kindly fill-up the needed information:");
JOptionPane.showMessageDialog(null,"Thank You,"+f+" of "+h+" from school year "+"["+g+"]"+" You have succesfully reserved the newspaper,");
}
}
}
case2:
{
c =Integer.parseInt(JOptionPane.showInputDialog("-----------MIDLAND COURIER-----------\nChoose from the following weeks: \n\t\t\t[1]-Week 1\n\t\t\t[2]-Week 2\n\t\t\t[3]-Week 3\n\t\t\t[4]-Week 4\nChoose the week of the newspaper you want to reserve?: "));
while(c>4||c<1)
{
c =Integer.parseInt(JOptionPane.showInputDialog("Invalid choice!\nPlease choose from the following only.\n 1-Week 1, 2-Week 2, 3-Week 3, 4-Week 4 \nChoose the week of the newspaper you want to reserve?: "));
}
if(d==0)
{
e =Integer.parseInt(JOptionPane.showInputDialog("Choices:\n\t\t\t[1]-Yes\n\t\t\t[2]-No\nDo you really want to reserve the newspaper?: "));
if(e==1)
{
d=d+1;
JOptionPane.showMessageDialog(null,"Kindly fill-up the needed information:");