Add the following constants in the class definition, before the main method:
private final static float START_COST = 1.5f;
private final static float HIGH_TARIFF = 0.5f;
private final static float LOW_TARIFF = 0.25f;
private final static int FIXED_MINS = 2;
private final static int HIGH_TARIFF_MINS = 10;
Then add this to the main method you already had:
float price = START_COST;
if (x > FIXED_MINS) {
if (x <= HIGH_TARIFF_MINS) {
price += HIGH_TARIFF*(x-FIXED_MINS);
}
else {
price += HIGH_TARIFF*(HIGH_TARIFF_MINS-FIXED_MINS)
+ LOW_TARIFF*(x-HIGH_TARIFF_MINS);
}
}
System.out.printf("A %d minute call costs %.2f", x, price);
Answer:
5 indicators of happiness that might surprise you · Happiness is deep · Happy is busy · Can't buy me happiness · The happiness gene · No regrets.
Explanation:
the opening tag for an HTML document
If you have windows you have Windows Defender Installed already!!
You can use a(n) <u>database server; Databases, like MySQL</u><u> and PostgresSQL, are widely used to store data.</u>to store large amounts of customer data for a website.
<h3>What is the difference between POP3 and IMAP coursera?</h3>
POP3 can only download email to one local device. IMAP can only download email to one local device. POP3 is used for sending emails. IMAP can download emails onto multiple devices.
<h3>When would you use IMAP?</h3>
IMAP and POP are two methods to access email. IMAP is the recommended method when you need to check your emails from several different devices, such as a phone, laptop, and tablet.
To learn more about database server, refer
brainly.com/question/23752341
#SPJ4