Question: 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
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
