Holmgate Plumbing based in the Sweden do business with the United Kingdom as a plumber's merchant. However, due to the United Kingdom leaving the European Union on 01/01/2021, further additional details are required on their tax return to account for customs duties. You have been asked to develop a Java GUI that will allow a user to type in this extra information. The information that is required is shown below:

  • Year: An integer value, greater than 2020 and less than 2050.
  • Month: An integer value, range 1 to 12.
  • Tax Reference: A string that has a minimum of 9 characters.
  • Merchandise amount: A float that should allow negative values.

However, Holmgate Plumbing do not always trade with the United Kingdom every month in the year and so not all months require this information to be entered.

1. Firstly, write a class to represent the custom duties information required. Please ensure that the setter methods, for the properties, performs the required input validation.

2. Secondly, the requirements for the custom duties input screen are as follows:

  • The user is allowed enter in the Year/Month.
  • The user can then choose whether this Year/Month combination requires Tax information to be input. Utilise one of the GUI components to enable / disable the Tax Reference / Merchandise fields entry. These fields should only be enabled if the user has indicated that they have data for this month. Please note that if there is no data to be entered, then only the year and month are saved to the customs duties class.
  • A Cancel button is required on this input screen. If the user clicks this button, they should be asked to confirm they want to exit. Exit should close the custom duties input screen.
  • A Save button is required which allows you to save the data that the user entered. This button should only be enabled when the user has entered in valid data. When the Save button is clicked, the user should be asked to confirm that the data is correct. The data should be saved to a text file, no specific format required.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.