Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In the SailorLicense class, declare the following private fields: integer fee integer year integer id and define the following public methods: getFee 0 has no
In the SailorLicense class, declare the following private fields:
integer fee
integer year
integer id
and define the following public methods:
getFee has no parameters and returns the fee field.
getYear has no parameters and returns the year field.
getld has no parameters and returns the id field.
Ex If the input is then the output is:
License fee:
License year:
Iicense id:
Note: If a field is not properly declared as private, an error message will be output.
SailorLicenseAccess.jav:
public class sailorlicense f
I your code goes here
public void setfeeint customFee fee rustnmfop.
feo rust nmFen.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started