Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

As you are preparing to take off and visit several places in the globe in the fo

ID: 3667748 • Letter: A

Question

As you are preparing to take off and visit several places in the globe in the following year, you are given a final task by your friendly (?!) instructional personnel at your favorite academic institution. You need to write a Java program that will calculate the total price of your flights taking into account special deals. You will be travelling during one, two or three months (they don’t have to be adjacent). Each month, you will fly to two different cities of your choice. As a user to your program, you will need to supply the following information:

• Month of Travel

• Destination Cities

• Air fare and Airline

for each destination The month of travel input will be given in numeric format (1, 2, … 12). If your trips happen in September, October or November, your program should inform you that special deals for two particular destinations are available from particular airlines. The discount destinations will always be San Diego and Miami, while the airlines offering discounts to both of those cities will be SpeedyAirlines and FlyWithUs.So, the program will initially ask:

Which month would you like to travel?

Which cities are you flying to in March?

Your program will then ask you whether you would like to start the process from the beginning supplying travel information for a different month.

More travelling? (Type no to exit or any letter to continue)

Your program should not allow the user to enter information for more than three months even if the user keeps on selecting to continue.

Before exiting, the program will present the information it has accumulated about the trips on one, two or three travel months. It should print the information on a tabular format where the rows represent months and the columns are the cities. A cell of the table will report the price of the airfare that has been reported for that particular month and that particular city. The price should be printed with no more than 2 decimal digits.

Need to construct a loop here.

Explanation / Answer

A dynamic dropdown list can help this project.

In a drop-down list, enter the twelve months

on selecting the month of September, November and
December, display the destinations,

once the user chose Miami or San Diego, display another drop-down list with the airlines having the offers.

div class="form-group1">

<option>Denver</option>

<option>Las Vegas</option>

<br><br>

<input type="button" value="Save Me!">

<option>May</option>

<option>September</option>

<br><br>

<input type="button" value="Save Me!">

function getOption1() {

var obj = document.getElementById("mySelect");

document.getElementById("demo").innerHTML =

obj.options[obj.selectedIndex].text;

}

function getOption2() {

var obj = document.getElementById("mySelect");

document.getElementById("demo").innerHTML =

obj.options[obj.selectedIndex].text;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote