1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tresset_1 [31]
3 years ago
10

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

Computers and Technology
2 answers:
k0ka [10]3 years ago
8 0

#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;

}

// FIXME: Write CreateLicenseNum()

void DogLicense::CreateLicenseNum(int customID) {

   licenseNum = (100000 * customID) + licenseYear;

}

int DogLicense::GetLicenseNum() const {

  return licenseNum;

}

int main() {

  DogLicense dog1;

  int userYear;

  int userId;

  cin >> userYear;

  cin >> userId;

  dog1.SetYear(userYear);

  dog1.CreateLicenseNum(userId);

  cout << "Dog license: " << dog1.GetLicenseNum() << endl;

  return 0;

}

Juliette [100K]3 years ago
6 0

Answer:

#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;

}

void DogLicense::CreateLicenseNum(int customID) {

   licenseNum = (100000 * customID) + licenseYear;

}

int DogLicense::GetLicenseNum() const {

   return licenseNum;

}

int main() {

   DogLicense dog1;

   dog1.SetYear(2014);

   dog1.CreateLicenseNum(777);

   cout << "Dog license: " << dog1.GetLicenseNum() << endl;

return 0;

}

Explanation:

You can see the whole code above, but let me explain the fixed function.

void DogLicense::CreateLicenseNum(int customID) {

   licenseNum = (100000 * customID) + licenseYear;

}

The function header is already declared in the class. It takes <em>customID</em> as a parameter. To find out the <em>lisenseNum</em>, we need to apply the given formula <em><u>(100000 * customID) + licenseYear</u></em>.

You might be interested in
A type of user interface that features on- screen objects, such a menus and icons, manipulated by a mouse.
faltersainse [42]

Explanation:

What want help with i just see answer there maybe if you want to know the meaning of Gui it is : A graphizal user interface (GUI) is a type of user interface through which users interact with electronic devices via visual indicator representations.

and next time please make yourself clear with your sentence no Offense

6 0
2 years ago
Match the personality traits with their description
Crank

Believing in your capabilities and demonstrating confidence in the tasks you perform - Self Esteem

Being loyal, sincere, and trustworthy in your job - Honesty

Being friendly and communicating enthusiastically with co workers - Sociability

Being accountable for your actions - Responsibility

Hope this helped!

~Just a girl in love with Shawn Mendes

7 0
3 years ago
Read 2 more answers
Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
Tasya [4]

Answer:

IE 10

Explanation:

It is the newest version in the list of options

8 0
3 years ago
Web services can exchange information between two different systems only if the operating systems and programming languages upon
stich3 [128]
Because if im talking to someone in english but they are from china and communicating to me in chinese then thas what itll do
4 0
3 years ago
The code int *p; declares p to be a(n) ____ variable. new
Pavel [41]
Int* p; defines a pointer variable.
8 0
4 years ago
Other questions:
  • To create a digital file from an old photo, I would use a _____.
    10·1 answer
  • What is an optical storage device?
    7·2 answers
  • Differentiate between Software as a service, platform as a service and infrastructure as a service.
    14·1 answer
  • How a computer encodes text, how it is processed and how computer data is represented.
    6·1 answer
  • Which best describes a hybrid drive?
    11·1 answer
  • It is important to know the terms of use of any website because why
    12·2 answers
  • A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable a
    9·1 answer
  • My messaging system is messed up. It keeps saying I'm getting messages but then it says nothing new in my inbox. I'm confused- H
    15·2 answers
  • Which of the following shows the correct order of inventions that helped the first computers make calculations?
    9·1 answer
  • The Power of If Worksheet
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!