67 245
Assignments Done
99,2%
Successfully Done
In November 2018

Answer to Question #58689 in Java | JSP | JSF for James

Question #58689
Write a program for Horizon Phones, a provider of cellular phone service. Prompt a user for maximum monthly values for talk minutes used, text messages sent, and gigabytes of data used, and then recommend the best plan for the customer's needs. A customer who needs fewer than 500 minutes of talk and no text or data should accept Plan A at $49 per month. A customer who needs fewer than 500 minutes of talk and any text messages should accept Plan B at $55 per month. A customer who needs 500 or more minutes of talk and no data should accept either plan C for up to 100 text messages at $61 per month or Plan D for 100 text messages or more at $70 per month. A customer who needs any data should accept Plan E for up to 2 gigabytes at $79 or Plan F for 2 gigabytes or more at $87.
Expert's answer
import java.util.*;
public class Question_58689 {
public static void main(String[] args) {
int min,message,gigab;
Scanner sc = new Scanner(System.in);
System.out.print("enter minutes : ");
min = sc.nextInt();
System.out.print("enter messages : ");
message = sc.nextInt();
System.out.print("enter gigabytes : ");
gigab = sc.nextInt();
if(min<500 && message == 0 && gigab == 0)System.out.println("Plan A, 49$ per month");
if(min<500 && message > 0 && gigab == 0)System.out.println("Plan B, 55$ per month");
if(min>=500 && gigab == 0 && message <=100 && message>0)System.out.println("Plan C, 61$ per month");
if(min>=500 && gigab == 0 && message >100)System.out.println("Plan D, 70$ per month");
if (gigab>0 && gigab <2) System.out.println("Plan E, 79$ per month");
if (gigab>0 && gigab >=2) System.out.println("Plan F, 87$ per month");
}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions