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:
2
Explanation:
The second option is the only one that will work. The last would work but doesn't make the code any shorter.
Answer:
chunking and short-term is the correct answer of this question.
Explanation:
chunking is a strategy to enhance a short-term memory.
Chunking is an method used to separate larger numbers that can not be psychologically separated.Chunking is the grouping of words in one sentence into short, important phrases. A chunk is the material segment that is used in many graphical formats, such as PNG etc.
Short-term memory is the knowledge a person is considering or is conscious of. This is also called healthy or main memory.
Answer:Today, we're introducing three revolutionary products. The first one is a widescreen iPod with touch controls. The second is a revolutionary mobile phone. And the third is a breakthrough Internet communications device. So, three things: a widescreen iPod with touch controls, a revolutionary mobile phone, and a breakthrough Internet communications device. An iPod, a phone, and an Internet communicator. An iPod, a phone...are you getting it? These are not three separate devices. This is one device. And we are calling it iPhone. Today, Apple is going to reinvent the phone.
Late last year, former Apple engineer Andy Grignon, who was in charge of the radios on the original iPhone, gave behind-the-scenes look at how Apple patched together demos for the introduction, with Steve Jobs showing off developmental devices full of buggy software and hardware issues. The iPhone team knew that everything had to go just right for the live iPhone demos to succeed, and they did, turning the smartphone industry on its head even as Apple continue to scramble to finish work on the iPhone.
Apple had actually been interested first in developing a tablet known as "Safari Pad", but as noted by a number of sources including Steve Jobs himself, the company shifted gears once it became clear how revolutionary the multi-touch interface developed for the tablet could be for a smartphone. Apple's tablet wouldn't surface until the launch of the iPad in 2010, three years after the introduction of the iPhone.
Seven years after the famous Macworld 2007 keynote, the iPhone has seen significant enhancements in every area, but the original iPhone remains recognizable as Apple has maintained the overall look of a sleek design with a larger touchscreen and a single round home button on the face of the device.
Explanation: