subject

This is going to introduce the mythical Beartooth Hiking Company (BHC). This small tour business will give backpacking tours in the Beartooth-Absaroka wilderness during the summer months of each year. The owner has decided that he'd like to provide a way for people to get quotes on how much a tour will cost, and has approached you to design a solution.

For this, you are to make a window (a JFrame) that will hold controls for allowing a user to set the begin date and duration of a potential tour. Since making a Web-Start application is no longer an option, you need to learn how to bundle you application in a nice "jar" file so I can see how it works.
For this application, you should have controls for
• Setting the beginning date
o Year
o Month
o Day
• Setting the duration of the hike (note that different hikes have different duration options)
• Submitting the query (use a JButton)
• Showing the results (DON'T use a JButton)
o Total Cost
I have provided two classes to assist you in your project. I will attach these.
The first class, BookingDay, is a class that allows you to define a single BookingDay. There are two constructors
• BookingDay()
• BookingDay(int year, int month, int day)
The first constructor allows the class to be used a Java Bean in later homeworks. The second allows you to define a day based on a four digit year, a month (1-Jan, 12-Dec) and a day. Take a look at the source code and look at the other methods provided. There is a isValidDate() method to see if the arguments you provided describe a real date.
The second class, Rates, is a class that allows you to define a tour period and then get a cost for the tour. You need to define a begin date and a duration and then you can get the cost of the tour. Don't forget to call isValidDates() to verify that your input dates are within the season and are valid.
It's up to you how to lay out the window, but keep in mind the balance and symmetry issues.
You are responsible for defensive programming! I should not be able to "break" your application by typing in junk to the input fields. In addition, use JOptionPanes to inform the user of what went wrong and how they should fix it. Tell them what is wrong! Don't just say an error has occurred without telling them exactly what happened!
If you use an awkward style of input (require two digits for a month), you must let the user what you expect them to enter. DO NOT MAKE THEM GUESS. Beware GridLayout. Students have been tempted to "slap something together" with GridLayout and it doesn't look very good. Put a little thought into your layout. Also be specific with error messages, avoid the "something isn't right" class of message, tell the user what is wrong.
Use the values for the hikes that were given. You will need someway for a user to select which hike they want and then based on that the duration.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:00
Donna and her team of five have invented a new gadget for the science exhibition in their college. which intellectual property right will protect their invention?
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
question
Computers and Technology, 24.06.2019 08:00
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
You know the right answer?
This is going to introduce the mythical Beartooth Hiking Company (BHC). This small tour business wil...
Questions
question
Mathematics, 14.10.2021 23:00
question
Mathematics, 14.10.2021 23:00
question
Mathematics, 14.10.2021 23:00
Questions on the website: 13722361