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
Minerals can form deep inside Earth’s crust by
ipn [44]

ANSWER:

Minerals can form deep inside earth's crust by the crystallization of melted materials. There are two ways on how minerals are formed: crystallization of melted materials and the crystallization of materials dissolved in water.

Hope this helps!

5 0
3 years ago
• Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment a
kobusy [5.1K]

Answer:

10

Explanation:

i don't know please just thank me

8 0
3 years ago
Write statements that output variable numComputers as follows. End with a newline
gavmur [86]

Complete Question:

Write statements that output variable numComputers as follows. End with a newline. There are 10 computers.

#include <iostream>

using namespace std;

int main()

{

int numComputers;

cin >> numComputers; // Program will be tested with values: 10.

...

return 0;

}

Answer:

cout << "There are ";

cout << numComputers;

cout << " computers." << "\n";

Explanation:

Using three cout statements the string "There are 10 computers." is printed out, notice that the variable numComputers is entered by the user when the program is run. Another way of concatenating an integer variable and string for printout is by the use of the + (plus) operator.

8 0
3 years ago
What describes the time it takes a packet to move from one designated on the network to
lana66690 [7]

Answer:Latency

Explanation:Latency is the measurement that describes about the (RTT)round trip time of a packet. RTT consist of the function of the packet travelling from the source to destination and then back again to the source port. If there is any kind of disturbance in the path of transmission then it causes the loss in the data packet.Therefore, the correct option is latency.

5 0
3 years ago
A light rag is striking the surface of earth. Which factor would make the light ray more likely to be absorbed than reflected?
Sergeu [11.5K]

Answer:

The answer is D.

Explanation:

because the other answers doesn't make sense.

6 0
3 years ago
Other questions:
  • Assuming your computer only has one network card installed; explain how your virtual machine is able to share that card with you
    10·1 answer
  • Write a program to solve the selection problem. Let k = N/2. Draw a table showing the running time of your program for various v
    12·1 answer
  • Carol typed a memo to send to everyone in her department. To create this memo, she used a _____. spreadsheet word processor fax
    10·2 answers
  • I need help with some computer stuff
    8·1 answer
  • When a JSP page is compiled, what is it turned into?
    11·1 answer
  • A database planner names a field “Organic ingredients_3”. Why would this name Create possible problems in programming?
    8·2 answers
  • Use the drop-down menus to complete each statement. Two main versions of Outlook are the desktop app and the app. The has limite
    15·2 answers
  • Can both mediated interpersonal communication and mass communication has an ability to reach huge number of recipients or audien
    11·1 answer
  • Please help!!
    6·1 answer
  • Can you help me solve this challenging activity?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!