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
Visual-verbal synergy has nothing to do with text, but solely with images used in a design.
Ilia_Sergeevich [38]
I think it is true (A) 
3 0
3 years ago
Describe the pace of change in ICT
densk [106]

Answer:

Information and communications technology is an extensional term for information technology that stresses the role of unified communications and the integration of telecommunications and computers, as Technology Trends 2016

#1: Spreading intelligence throughout the cloud. ...

#2: Self-managing devices. ...

#3: Communication beyond sight and sound. ...

#4: Fundamental technologies reshaping what networks can do. ...

#5: Weaving security and privacy into the IoT fabric.

Explanation:

look for a question that i have answered answer it and also plz give me brainliest on this one plz

4 0
3 years ago
Determine whether the compound condition is True or False.
Vlada [557]

The  compound condition are:

  • 7<12 or 50!=10 is false
  • 7<12 and 50<50 is false
  • not (8==3) is true

<h3>What is compound condition?</h3>

A compound statement is known to be one that shows up as the body of another statement, e.g. as in if statement.

The  compound condition are:

  • 7<12 or 50!=10 is false
  • 7<12 and 50<50 is false
  • not (8==3) is true

Learn more about compound condition  from

brainly.com/question/18450679

#SPJ1

8 0
1 year ago
State ONE (1) disadvantage of using computers to store and process<br> information.
NNADVOKAT [17]

Answer:

it can be hacked

Explanation:

there is always a chance for computer data to be hacked

3 0
2 years ago
If you like to play graphic-intensive games on your computer and you find that your computer can't keep up, you should add a ___
s344n2d4d5 [400]
I think its video card tell me if i'm wrong
6 0
3 years ago
Other questions:
  • _____ is two or more connected computers.
    8·1 answer
  • How do you change your age on here? I accidentally put that i was 15 but i am only 13. How do I change this?
    12·1 answer
  • Please check my answer! (Java)
    13·1 answer
  • Which option should you select to accept a tracked change? A. Accept B. Reject C. Review D. Delete
    8·2 answers
  • If you used a peach as a model of an animal cell, what would the peach's skin represent? A.nucleus B.cell wall C.cytoplasm D.cel
    10·2 answers
  • This is a tableware use to serve the main dish
    11·1 answer
  • Which of the following is a characteristic of a college savings plan
    6·2 answers
  • A large number of consecutive IP addresses are available starting at 198.16.0.0. Suppose that four organizations, Able, Baker, C
    11·1 answer
  • Jose would like to have text with predefined styles that can flow around an image in a variety of shapes and sizes
    10·2 answers
  • Why do designers of smartphones hide computer processing details from
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!