Question: Application 1: Create an application that gets start and end dates for an appointment and calculates the total amount for the stay. Console -------------------------------------------------------------------------------------- Appointment
Application 1: Create an application that gets start and end dates for an appointment and calculates the total amount for the stay.
Console
--------------------------------------------------------------------------------------
Appointment Calculator
Enter the start month (1-12): 5
Enter the start day (1-31): 16
Enter the start year: 2018
Enter the end month (1-12): 5
Enter the end day (1-31): 18
Enter the end year: 2018
Start Date: May 16, 2018
End Date: May 18, 2018
Price: $145.00 per day
Total price: $290.00 for 2 days
Continue? (y/n): n
Bye!
--------------------------------------------------------------------------------
Specifications
1. Use proper statement indentation and meaningful variable names in the code.
2. Add a multi-line description of this application (to include your name and the date written) at the beginning of the code for other programmers to read.
3. Add a comment to each code statement explaining why the statement is in the code.
4. Create a class named Appointment that defines an appointment object. This class should contain encapsulated instance variables for the start date and end date. It should also contain a constant initialized to the daily rate of $145.00.
5. The Appointment class should include the following methods:
public LocalDate getStartDate()
public String getStartDateFormatted()
public void setStartDate(LocalDate date)
public LocalDate getEndDate()
public String getEndDateFormatted()
public void setEndDate(LocalDate date)
public int getNumberOfDays()
public String getPricePerDaysFormatted()
public double getTotalPrice()
public String getTotalPriceFormatted()
6. Assume that the dates are valid and that the end date is after the start date.
7. Add javadoc comments to all the classes in the project. Make sure these comments include @param and @return tags where ever these tags are appropriate.
8. This documentation must include descriptions for all of the constructors and methods as well as information about all parameters and return values.
9. Generate the documentation for the entire project.
View the documentation to be sure it is complete.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
