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
What is the check digit for the following original product number: 140501941 ? *
Natasha_Volkova [10]

Explanation:

I think it is 7, but I could be wrong..... sorry

8 0
2 years ago
Read 2 more answers
If Count = 1 and X = 3, what will be displayed when code corresponding to the following pseudocode is run? Do Set Y = Count + X
kirill115 [55]

Answer:

4 5 6

Explanation:

Since there is a do-while loop, you need to check the values for each iteration until the condition (Count <= X) is not satisfied.

First iteration ->  Count = 1 and X = 3, Y = 1 + 3, Write Y -> 4

Second iteration ->  Count = 2 and X = 3, Y = 2 + 3, Write Y -> 5

Third iteration ->  Count = 3 and X = 3, Y = 3 + 3, Write Y -> 6

After the third iteration count is equal to 4 and X is equal to 3. That is why loop ends.

3 0
3 years ago
Large computer programs, such as operating systems, achieve zero defects prior to release. Group of answer choices True False Pr
OLEGan [10]

Answer:

The answer is "False"

Explanation:

It is put to use Six Sigma had 3.4 defects per million opportunities (DPMO) from the start, allowing for a 1.5-sigma process shift. However, the definition of zero faults is a little hazy. Perhaps the area beyond 3.4 DPMO is referred to by the term "zero faults.", that's why Before being released, large computer programs, such as operating systems, must have no faults the wrong choice.

8 0
3 years ago
Are there any tips or helpful advice for people who want to learn Photoshop?
stepan [7]

I feel like it is best to mess with it some with pictures you don't care about so you can see what would and what doesn't. that is how my sister did it and she take some grad pics. there are probably classes to

3 0
3 years ago
In an interview, Tom was asked to give a brief on how containers perform virtualization. How should Tom reply
defon

There is great improvement in technology. Tom should reply that Containers uses Containers use operating system (OS) components for virtualization.

  • That is a kind of operating system (OS) virtualization where leverage features is placed on the host operating system so as to separate or isolate processes and control the processes' access to CPUs, memory and desk space.

Container based virtualization often makes use of the kernel on the host's operating system to run multiple guest instances. By this, one can run multiple guest instances (containers) and each container will have its specific root file system ascribe to it, process and network stack.

Learn more from

brainly.com/question/24865302

6 0
2 years ago
Other questions:
  • Whats a computer scientist.
    5·2 answers
  • What is the main storage location of a computer
    13·1 answer
  • How to tell if motherboard has bluetooth?
    8·1 answer
  • Create an interactive program to use class a LightsOut class to allow a user to play a game. Each step in the game will require
    6·1 answer
  • How do emotions affect purchasing decisions?
    6·1 answer
  • Two-dimensional random walk (20 points). A two-dimensional random walk simulates the behavior of a particle moving in a grid of
    14·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • Complete the steps for adding a recurring event.
    10·1 answer
  • PLEASE HELP ASAP!! Timed test!!
    12·1 answer
  • Clickstream tracking tools collect data on customer activities at web sites (true/false)?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!