Question: JAVA Define the missing method. licenseNum is created as: (100000 * customID) + licenseYear. Sample output: Dog license: 77702014 ...CODE BELOW // ===== Code from

JAVA Define the missing method. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:

Dog license: 77702014 ...CODE BELOW 

// ===== Code from file DogLicense.java ===== public class DogLicense { private int licenseYear; private int licenseNum;

public void setYear(int yearRegistered) { licenseYear = yearRegistered; }

// FIXME: Write createLicenseNum()

/* Your solution goes here */

public int getLicenseNum() { return licenseNum; } } // ===== end =====

// ===== Code from file CallDogLicense.java ===== public class CallDogLicense { public static void main (String [] args) { DogLicense dog1 = new DogLicense();

dog1.setYear(2014); dog1.createLicenseNum(777); System.out.println("Dog license: " + dog1.getLicenseNum());

} } // ===== end =====

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!