Computers and Technology

Project 14-1: Reservation CalculatorCreate an application that gets arrival and departure dates for a reservation and calculates the total amount for the stay. ConsoleReservation CalculatorEnter the arrival month (1-12): 5Enter the arrival day (1-31): 16Enter the arrival year: 2018Enter the departure month (1-12): 5Enter the departure day (1-31): 18Enter the departure year: 2018Arrival Date: May 16, 2018Departure Date: May 18, 2018Price: $145.00 per nightTotal price: $290.00 for 2 nightsContinue? (y/n): nBye!SpecificationsCreate a class named Reservation that defines a reservation. This class should contain instance variables for the arrival date and departure date. It should also contain a constant initialized to the nightly rate of $145.00.The Reservation class should include the following methods:public LocalDate getArrivalDate()public String getArrivalDateFormatted()public setArrivalDate(LocalDate arrivalDate)public LocalDate getDepartureDate()public String ()public setDepartureDate(LocalDate departureDate)public int getNumberOfNights()public String ()public double getTotalPrice()public String getTotalPriceFormatted()Assume that the dates are valid and that the departure date is after the arrival date. Possible enhancement

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 13:30, powellmj9216
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
image
Computers and Technology, 24.06.2019 04:30, NEUROPHARMACOLOGICAL
The ieee 802.11: defines standards for wireless local area network (wlan) communication protocols. identifies various computers or devices connected to a network. verifies any resource attached to another computer on a network that is different from the computer to which the user is logged on. connects multiple local area networks (lans) and wide area networks (wans).
Answers: 2
image
Computers and Technology, 25.06.2019 08:10, andrewmena05
Spreadsheet software is more powerful than financial planning software. - true or false
Answers: 2
image
Computers and Technology, 25.06.2019 15:10, afosburgh20
Why is it important for computer makers to include accessibility features in their computer designs?
Answers: 1
Do you know the correct answer?
Project 14-1: Reservation CalculatorCreate an application that gets arrival and departure dates for...

Questions in other subjects:

Konu
Mathematics, 04.08.2021 22:20