111k views
5 votes
Define the missing method. licenseNum is created as: (100000 * customID) + licenseYear, where customID is a method parameter. Sample output with inputs 2014 777:

User Dudemonkey
by
4.8k points

2 Answers

5 votes

Answer in c++:

void DogLicense:: CreateLicenseNum(int customID) {

licenseNum = (100000* customID) + licenseYear;

return;

}

Step-by-step explanation:

User Phaneven
by
5.1k points
6 votes

Answer:

The method in Python is as follows;

def licenseNum(customID,licenseYear):

return (100000 * customID) + licenseYear

print(licenseNum(777,2014))

Step-by-step explanation:

This line declares the method with its parameters

def licenseNum(customID,licenseYear):

This line returns the expected output

return (100000 * customID) + licenseYear

The method is tested using:

print(licenseNum(777,2014))

User Phuong LeCong
by
6.2k points