Computers and Technology

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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 20:00, shadow6728g
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
image
Computers and Technology, 24.06.2019 11:00, zeesharpe05
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
image
Computers and Technology, 24.06.2019 14:00, maddi0132
In the microsoft® access® and microsoft excel® programs, the ribbon contains tabs that are divided into with like tools in them. parts groups containers bunches
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, palmekar000
When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. this can be done by normalizing to values between 0 and 1, or throwing away outliers. for this program, adjust the values by subtracting the smallest value from all the values. the input begins with an integer indicating the number of integers that follow. ex: if the input is 5 30 50 10 70 65, the output is: 20 40 0 60 55
Answers: 1
Do you know the correct answer?
This is going to introduce the mythical Beartooth Hiking Company (BHC). This small tour business wil...

Questions in other subjects:

Konu
Social Studies, 05.10.2019 11:30
Konu
Mathematics, 05.10.2019 11:30