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
You have to communicate a signal in a language that has 3 symbols A, B and C. The probability of observing A is 50% while that o
Vlada [557]

Answer:

Huffman code is use for encoding the language. The entropy when calculated is 1.5.

Explanation:

Using Huffman Coding scheme to encode:

The huffman coding scheme is described in the attachment.

To find entropy; we use the formula given below:

H = ∑p log_{2}  \frac{1}{p}

where H = Entropy and p = probability

p(A) = 50% = 1/2

p(B) = 25% = 1/4

p(C) = 25% = 1/4

H = \frac{1}{2} log_{2} 2 + \frac{1}{4}  log_{2} 4+ \frac{1}{4} log_{2}4\\H = \frac{1}{2}(1) + \frac{1}{4}(2) + \frac{1}{4}(2)\\H = \frac{1}{2} + \frac{2}{4} + \frac{2}{4}\\H = \frac{1}{2} + \frac{1}{2} + \frac{1}{2}\\H = \frac{3}{2}\\H = 1.5

Download pdf
7 0
3 years ago
Please find one organization that has recently adopted virtualization and summarize their reasons for taking this approach. What
Mamont248 [21]

Answer:

Harley-Davidson Motor Company

Explanation:

Harley-Davidson produces and sells custom-made, touring as well as cruiser motorcycles that feature elegant styling,  modern innovative design, and high quality performance with the ability to customize to ones taste.  Harley-Davidson moved 95% of their x86 server workloads to virtualized environments utilizing VMware infrastructures as of 2018. They report to have being able to have higher system availability, effective and simple disaster recovery capabilities, improved operation efficiencies, and cloud-ready infrastructure. One of the major challenges of virtualization is Security, Virtual systems can easily get compromised.

8 0
3 years ago
Proxy servers and ACLs on network devices are examples of non-security devices with security features, while firewalls and IDS/I
AysviL [449]

Complete Question:

Proxy servers and ACLs on network devices are examples of non-security devices with security features, while firewalls and IDS/IPS systems are the network's specialized security devices.

Group of answer choices:

A. True.

B. False.

Answer:

A. True.

Explanation:

A proxy server is an example of non-security devices with security features because it acts as a hub or gateway between a user and the internet. Therefore, when a user request for resources through a website, the proxy server acts as an intermediary between them and the web server providing such resources.

ACL is an acronym for access control list and it comprises of rules that grant or deny access to resources on a network.

A firewall is a network security system which prevents unauthorized access on a private network by monitoring, controlling and filtering inbound and outbound network traffic (packets) based on a set of security rules.

IDS and IPS are acronym for intrusion detection system and intrusion prevention system respectively. IDS is a security system which monitors the network traffic and notifies the engineer when there's a malicious activity. IPS is a security system which monitors the network traffic and blocks malicious activity as well as keeping logs.

<em>Hence, Proxy servers and ACLs on network devices are examples of non-security devices with security features, while firewalls and IDS/IPS systems are the network's specialized security devices. </em>

3 0
3 years ago
Please help me I don't understand. It's Python.
Vitek1552 [10]
It’s , c probably sorry if I’m wrong
8 0
3 years ago
Read 2 more answers
Which folder does the ipad saves my pictures?
saw5 [17]
It will save it in the pre-installed iphotos application.
Hope this helps. <span />
4 0
3 years ago
Read 2 more answers
Other questions:
  • What is the use of word art?
    10·1 answer
  • nswer the following questions concerning chapter 1:1.1 Which pair of layers are NOT peer layers?a.Transport layer in the sender
    9·1 answer
  • Write a class called (d) Teacher that has just a main method. The main method should construct a GradeBook for a class with two
    7·1 answer
  • What would be the results of the following code? final int SIZE = 25; int[] array1 = new int[SIZE]; … // Code that will put valu
    9·1 answer
  • Write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the
    6·1 answer
  • What is infinite recursion?
    7·1 answer
  • A Chief Information Security Officer (CISO) needs to establish a KRI for a particular system. The system holds archives of contr
    13·1 answer
  • Why are ethics important in PR?
    8·1 answer
  • 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
  • Cloud architects have been largely replaced by ScrumMasters.<br><br> True<br><br> False
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!