Engineering
Engineering, 30.11.2019 04:31, hfleysher

Create a class, airtravelcost, that has the following characteristics: •attributes of departure/arrival date (stringin the form mmdd), departure/arrival time (stringin the form hhmm), destination, travelfare, and hotelcost(cost per night). •a constructor that accepts and updates all the attributes•a normal accessor for destination•durationcan be calculated. use the gregoriancalendar class. ocreate two gregoriancalendar objects, one for each of the departure and arrival dates and times. ouse the gettimeinmillismethod to get a date/time in milliseconds since a standard date & time. osubtract the two values (for the departure and arrival date/time) to yield duration in milliseconds. odivide the result by 60,000to get minutes and divide again by 60to get hours, etc. •calculate the lodging (hotel) cost by dividing the durationby 24hours and use the number of whole days only (no partial days). multiply the number of days by the hotel cost per night. •the total cost can be calculated as travelfare + getlodgingcost() + agent_fee•a tostringmethod returns a string formatted by string. format()who’s output looks like "air travel to destinationwill take durationand cost totalcost"

answer
Answers: 3

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, sarahgrindstaff123
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
image
Engineering, 04.07.2019 18:10, Tyrant4life
Draw the engineering stress-strain curve for (a) bcc; (b) fcc metals and mark important points.
Answers: 1
image
Engineering, 04.07.2019 18:20, yasyyas646646
Agas mixture consists of 8 kmol of h2 and 2 kmol of n2. determine the mass of each gas and the apparent gas constant of the mixture.
Answers: 3
image
Engineering, 04.07.2019 18:20, moneywaydaedae
Air is compressed isentropically from an initial state of 300 k and 101 kpa to a final temperature of 1000 k. determine the final pressure using the following approaches: (a) approximate analysis (using properties at the average temperature) (b) exact analysis
Answers: 1
Do you know the correct answer?
Create a class, airtravelcost, that has the following characteristics: •attributes of departure/arri...

Questions in other subjects:

Konu
Mathematics, 25.01.2022 02:50
Konu
History, 25.01.2022 02:50