Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include 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)
#include
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()
/* Your solution goes here */
int DogLicense::GetLicenseNum() const { return licenseNum; }
int main() { DogLicense dog1;
dog1.SetYear(2014); dog1.CreateLicenseNum(777); cout
return 0; }
Challenge 15.2.2: Basic class definition Activity Define the missing function licenseNum is created as: (100000 customID) license Year. Sample outpu Dog license: 77702014 void Create LicenseNumCint customID int GetLicenseNumO const 9 private int license Year; int licenseNum 11 12 13 14 void DogLicense: :SetYear(int yearRegisteredD 1 licenseYear yearRegistered 15 return 17 19 FIXME: Write Create LicenseNumO 20 21 Your solution goes here 22 23 int DogLicense Get LicenseNumO const 1 24 return licenseNum Run Feedback
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started