subject

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

Here is the code already in the program:

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

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

// 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());

return;
}
}
// end

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, joshualoz5414
Acase study allows a more detailed look at the life of a single subject than any other study.
Answers: 3
image
Computers and Technology, 23.06.2019 16:30, jessisjawsome
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
image
Computers and Technology, 24.06.2019 06:30, toolazytobehuman
Me and category do i put them in because this is science
Answers: 1
image
Computers and Technology, 24.06.2019 17:40, lia1690
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3
You know the right answer?
Define the missing method. licenseNum is created as: (100000 * customID) + licenseYear. Sample outpu...

Questions in other subjects:

Konu
Mathematics, 11.06.2020 23:57
Konu
Mathematics, 11.06.2020 23:57