Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming Assignment JavaFX Its been a long road learning Java; youve definitely earned time off. Perhaps a relaxing cruise to the Caribbean but how

Java Programming Assignment JavaFX

Its been a long road learning Java; youve definitely earned time off. Perhaps a relaxing cruise to the Caribbean but how are you going to arrange it? Well need some sort of interface to select our cruise, the rooms we want, the number of passengers, activities, and so on. In fact, we can make our own right here, using Java UI components.

Note: This tutorial focuses on JavaFX. You are welcome to use Swing or other UI libraries for this assignment. While this is geared towards JavaFX (which replaces Swing since Java 8), the general principles are the same.

Program Requirements:

Create a new class called CruiseMaker. Inside this class, well create a number of components:

Create a RadioButton with options for the following: S.S. Abstraction, S.S. Polymorphism, S.S. Encapsulation, and S.S. Inheritance. Only one option can be selected at a time. Provide a Label that says Select a ship

Create two ImageView objects called ShipImage and ShipLayout. When the user selects one of the four different ships, have these two images change. You should populate these with images of different ships and deck layouts.

Create two DatePicker objects called Departure and Arrival. If the user selects a date in Arrival that is before Departure, issue a warning. Use the Label class to display a warning

Create at least five CheckBox objects. For each one, provide an activity or excursion (e.g., Snorkeling, rock climbing, etc. Provide a Label above it that says, Activities.

Create a ComboBox for passengers with the options 1,2,3, or 4. Add a Label above that says Number of Passengers.

Create a Label that says Total: $0. Update this total value based on the following: the ship selected, the length of the trip, number of passengers, and number of activities. You decide how much each option costs

Create a TextField that allows the user to input a name, address, phone number, and email address

Create a Button that saves Order. When the user hits Order, display a Label that says the cruise has been reserved.

You may place these elements in any arrangement, as long as each one is visible.

Include appropriate comments throughout your code.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions