<p>Cell Solutions, a cell phone provider, sells the following packages:</p> <p>3
ID: 3621223 • Letter: #
Question
<p>Cell Solutions, a cell phone provider, sells the following packages:</p><p>300 minutes per month: $45.00 per month</p>
<p>800 minutes per month: $65.00 per month</p>
<p>1500 minutes per month: $99.00 per month</p>
<p>The provider sells the following phones. ( A6% sales tax applies to the sale of a phone.)</p>
<p>Model 100: $29.95</p>
<p>Model 110: $49.95</p>
<p>Model 200: $99.95</p>
<p>Customers may also select the following options:</p>
<p>Voice mail: $5.00 per month</p>
<p>Text messaging: $10.00 per month</p>
<p>Write an application that display a menu system. The menu system should allow the user to select one package, one phone, and any of the options desired. As the user selects items from the menu, the application should show the prices of the items selected. </p>
Explanation / Answer
please rate - thanks
import java.util.*;
public class PhonePackage
{public static void main(String [] args)
{double price;
int choice,min,model=0,more=1,options=0;
String option;
Scanner in=new Scanner(System.in);
choice=50;
while(choice<1||choice>3)
{
System.out.println("Enter a package");
System.out.println("1. 300 minutes per month: $45.00 per month");
System.out.println("2. 800 minutes per month: $65.00 per month");
System.out.println("3. 1500 minutes per month: $99.00 per month");
choice=in.nextInt();
}
if(choice==1)
{price=45;
min=300;
}
else if(choice==2)
{price=65;
min=800;
}
else
{price=99;
min=1500;
}
System.out.println("You've chosen the "+min+" minute plan for $"+price+" per month");
choice=50;
while(choice<1||choice>3)
{
System.out.println("Enter a phone");
System.out.println("1. Model 100: $29.95");
System.out.println("2. Model 110: $49.95");
System.out.println("3. Model 200: $99.95");
choice=in.nextInt();
}
if(choice==1)
{price=29.95;
model=100;
}
else if(choice==2)
{price=49.95;
model=110;
}
else
{price=99.95;
model=200;
}
System.out.println("You've chosen model "+model+" for $"+(price+.06*price)+" including tax");
while(more==1)
{
choice=50;
while(choice<1||choice>2)
{
System.out.println("Enter an option");
System.out.println("1. Voice mail: $5.00 per month");
System.out.println("2. Text messaging: $10.00 per month");
choice=in.nextInt();
}
if(choice==1)
{price=5;
option="voice mail";
}
else
{price=10;
option="text messaging";
}
System.out.println("You've chosen "+option+" for $"+(price)+" a month");
options++;
if(options<2)
{ System.out.print("another option? 1=yes, 0=no");
more=in.nextInt();
}
else
more=0;
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.