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
Write on the importance of Computer application to statistics​
tatyana61 [14]

Answer:

Another way to categorise the relation statistics-computer is to list the different ways the computer can be used in statistics. The following are examples of such uses: numerical and graphical data analy- sis; symbolic computations; simulations; storing statistical knowledge; presentation of results.

Explanation:

5 0
3 years ago
Why is it important to record audio of silence in the area in which you are filming?
Serhud [2]

Answer:

To make sure that there is no other outside/excess noise while you are filming your actual film

Hoped this helped !

Cheers, Z

3 0
2 years ago
Read 2 more answers
5 características de la obsolescencia programada...
snow_lady [41]

Answer:

Obsolescencia programada es cuando un producto está diseñado deliberadamente para tener un tiempo de vida específico. ... Los productos dejan de funcionar al cabo de un tiempo, no porque estén estropeados, sino por que han sido diseñados para fallar al cabo de ese periodo.

Explanation:

espero y esto te pueda ayudar

4 0
3 years ago
Help , i couldn’t find this answer
Aleksandr-060686 [28]

Answer:

Internet Explorer

Explanation:

4 0
3 years ago
In database systems, the dbms enforces rules about which user can perform which action when. The rules are known as ________.
saw5 [17]

I guess the correct answer is concurrency control

Cοncurrеncy cοntrοl is a databasе managеmеnt systеms (DBMS) cοncеpt that is usеd tο addrеss cοnflicts with thе simultanеοus accеssing οr altеring οf data that can οccur with a multi-usеr systеm.

In database systems, the DBMS enforces rules about which user can perform which action when. The rules are known as concurrency control.

6 0
2 years ago
Other questions:
  • What should you do if ads keep popping up on your computer when using Google Chrome?
    14·1 answer
  • Of the following which would be the best data representation for this puzzle in a puzzle class?
    6·1 answer
  • You have noticed that one of your DNS servers has possibly been compromised. You believe that a cached DNS entry for your domain
    8·1 answer
  • 10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus th
    8·1 answer
  • The first numerical control machine tool was demonstrated in 1952 in the United States at the Massachusetts Institute of Technol
    14·1 answer
  • Does anyone know a good reason WHY to change your username.
    5·1 answer
  • What do we call the software program that handles the communication between a peripheral device and your computer?
    8·2 answers
  • Interest on loan paid to sangam stores Rs5000(journal entry)​
    13·1 answer
  • Direction: Read each item carefully and choose the letter of the correct answer. Write your answers on a separate sheet of paper
    12·1 answer
  • Write a while loop that continues to increment uservalue by 5 as long as uservalue is less than 0.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!