Question: Write a program and store it in a Sub called VacationPackage that does the following: (a) It asks for users first name and stores it
Write a program and store it in a Sub called VacationPackage that does the following:
(a) It asks for users first name and stores it in FName.
(b) It asks for users last name and stores it in LName.
(c) It asks for the destination of the trip and stores it in DesT.
(d) It asks for the number of miles (one-way) that the user will travel to the destination and stores it in MILES.
(e) It calculates the roundtrip flight ticket price and stores it in FTicket. (According to XYZ Airline Company, the roundtrip ticket price is about $0.30 per mile based on the one-way distance between the cities.)
(f) It determines the likely hotel price per night at the destination. (The real-time hotel price per night is expected to be (equally) randomly distributed anywhere between $120 and $180 (assume a whole dollar amount).) Assume that the price will be the same for each day that the traveler stays.
(g) It asks for the number of nights that the user will stay at the destination and stores it in Nights.
(h) It calculates the total price for the vacation package (including flight ticket and hotel) and stores it in PackPrice.
(i) Using the appropriate variables, it displays a message such as "Suzy Walsh would like to travel 1000 miles to New York. The price for the vacation package is $1,322.00, including a roundtrip flight ticket to New York ($300.00) and 7 days accommodations at the hotel there ($146 per night)."
Make sure there is an Option Explicit line at the top of the module and that you declare all of your variables appropriately.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
