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:
getFee0 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 98,2022663, then the output is:
License fee: 98
License year: 2022
Iicense id: 663
Note: If a field is not properly declared as private, an error message will be output.
SailorLicenseAccess.jav:
12 public class sailorlicense f
I* your code goes here */
public void setfee(int customFee) fee = rustnmfop.
feo = rust nmFen.
 In the SailorLicense class, declare the following private fields: integer fee

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!