Answer: 3. HTML focuses on a web page's structure and CSS focuses on its presentation.
Explanation: HTML is designed to allow you to add the content and format it correctly. However, CSS's job is to allow for stylizing.
<h2>"<lastmod>" is the right choice for the given scenario</h2>
Explanation:
<update> This tag does not belong to <URL> tag of the site map. Hence this option goes invalid.
<lastmod> This gives details of the date and time when the website content was changed. It will be in "W3C Date time format". This may omit time at times. This is the write answer.
<loc> This contains the URL of the web page.
<changefreq>: How frequently the "web page is likely to get modified". The values which it accepts are: "monthly, always
, daily
, weekly
,hourly, yearly
, never"
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);