Question: This is programmed in java. I have tried to get help from others on here but it seems like they cant get it to fully

This is programmed in java. I have tried to get help from others on here but it seems like they cant get it to fully work. My code and the question are below.

/* * This program calculates a customers monthly bill */ package hw3;

import java.util.Scanner; public class dataplan {

public static void main(String[] args) { // Define variables int GBs, Holder; double Bill; String Plan = " "; Scanner input = new Scanner(System.in); System.out.println("Enter what data plan you have (A, B, or C): "); Plan = input.next(); do { System.out.println("You did not enter a valid data plan try again"); System.out.println("Enter what data plan you have (A, B, or C): "); Plan = input.next(); }while (Plan != "A" || Plan != "B" || Plan != "C"); System.out.println("Enter how many GBs of data you used (Between 1 and 50): "); GBs = input.nextInt(); do { System.out.println("You did not enter a valid amount of GBs"); System.out.println("Enter how many GBs of data you used (Between 1 and 50): "); GBs = input.nextInt(); }while (GBs 50); if (Plan == "A") { Holder = (GBs - 2); Bill = (((Holder) * 10) + 29.99); System.out.println("Your bill this month is $"+Bill); } else if ( Plan == "B") { Holder = (GBs - 4); Bill = (((Holder) * 5) + 39.99); System.out.println("Your bill this month is $"+Bill); } else { Bill = 49.99; System.out.println("Your bill this month is $"+Bill); } if (GBs

input.close(); }

}

This is programmed in java. I have tried to get help from

Wireless Service Provider) A Wireless service provider has three different packages for its customers: Package A: For $29.99 per month 2GB of data is provided. Additional data is $10.00 Package B: For $39.99 per month 4GB of data is provided. Additional data is $5.00 Package C: For $49.99 per month unlimited data is provided. per GB per GB Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many GB of data was used. It should then display the total amount due. The program should recommend which package is the best for the customer Input Validation: Be sure the user only select package A, B or C. Also the GB used has to be between 0 and 50

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!