1. Member
Join Date
Feb 2012
Posts
17
Rep Power
0

Problem running DataGimmick program!!

good day all,
i am having an issue with running my program, i am not sure where i have gone wrong, i would appreciate it if someone could help me asap.

Thank you

here is what i was instructed to do:
You are to write a program for the DataGimmick wireless data provider company. The company
has three possible plans that consumers can sign up for, as follows:
Package: Monthly Fee: Included MB: Cost Per Additional (up to) 150 MB:
A \$9.99 150 14.99
B \$24.99 500 12.99
C \$39.99 2000 8.99
Note that additional data beyond the “Included MB” may only be bought in increments of 150MB,
even if only a portion as little as 1 additional MB is used.
• prompts the user for and reads in the exact number of MB of data they used (which cannot
have a fractional portion).
• prompts the user to enter the letter corresponding to their plan and reads in that plan’s letter.
• prints out the total monthly charge (in dollars and cents) for data usage for that user, based
on what they entered.

here is my code:
Java Code:
```import java.util.*;

public class DataGimmick
{

public static void main(String [] args)
{
double cost;
int data;
double fee;
boolean plan;
boolean A;
boolean B;
boolean C;

//Calculate the cost for different packages.

if (plan = A);
{
fee = (data - 150) / 150;
cost = fee * 9.99;
}

if ((data - 150) % 150 != 0);
{   additional = cost + 14.99;

}

if (plan = B);
{
fee = (data - 500) / 500;
cost = fee * 24.99;
}

{
if ((data - 500) % 500 != 0);
{   additional = cost + 12.99;

}

if (plan = C);
{
fee = (data - 2000) / 2000;
cost = fee * 39.99;
}

if ((data - 2000) % 2000 != 0);
{   additional = cost + 8.99;

}

{
// Prompt User for the data usage.
System.out.print("How Much Data Did You Use?");

// Prompt User for the package plan.
System.out.print("Which Plan Are You Using?");

//Print out the total monthly charge for data.
}

}```

2. Moderator
Join Date
Jul 2010
Location
California
Posts
1,641
Rep Power
9

Re: Problem running DataGimmick program!!

am having an issue with running my program, i am not sure where i have gone wrong
Neither do we...you should give us some context. Does it compile? Are there exceptions? If you want help, you need to describe your problem as best as you can and not hope that we will make the effort to review the problem and code in all its detail, which can be time consuming at best.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•