- #1
ineedhelpnow
- 651
- 0
i have another question i need help with
Define the missing function. licenseNumber is created as: (100000 * customID) + licenseYear. Sample output:
Dog license: 77702014
Sample program:
Below, do not type an entire program. Only type the portion indicated by the above instructions (and if a sample program is shown above, only type the <STUDENT CODE> portion.)
normally if i look at something long enough I am able to figure it out but this one just isn't clicking. how do i do it?
Define the missing function. licenseNumber is created as: (100000 * customID) + licenseYear. Sample output:
Dog license: 77702014
Sample program:
Code:
#include <iostream>
using namespace std;
class DogLicense{
public:
void SetYear(int yearRegistered);
void CreateLicenseNum(int customID);
int GetLicenseNum() const;
private:
int licenseYear;
int licenseNum;
};
void DogLicense::SetYear(int yearRegistered) {
licenseYear = yearRegistered;
return;
}
// FIXME: Write CreateLicenseNum()
<STUDENT CODE>
int DogLicense::GetLicenseNum() const {
return licenseNum;
}
int main() {
DogLicense dog1;
dog1.SetYear(2014);
dog1.CreateLicenseNum(777);
cout << "Dog license: " << dog1.GetLicenseNum() << endl;
return 0;
}
Below, do not type an entire program. Only type the portion indicated by the above instructions (and if a sample program is shown above, only type the <STUDENT CODE> portion.)
normally if i look at something long enough I am able to figure it out but this one just isn't clicking. how do i do it?