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
saw5 [17]
3 years ago
14

Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp

le output with inputs 2014 777:

Computers and Technology
2 answers:
Romashka-Z-Leto [24]3 years ago
6 0

Answer:

public int createLicenseNum(int customID){

  licenseNum = (100000 * customID) + licenseYear;

  return(licenseNum);    

}

Explanation:

g100num [7]3 years ago
3 0

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

You might be interested in
Describe how you would create a Java program that prompted the user to correctly enter a username and password. The username is
schepotkina [342]

Answer:

Explanation:

The program in question would create a new Scanner Object which asks the user for the Username first. It would then save this input into a temporary variable and compare it to the actual username in the database. Since the username is not case sensitive, we would use the toLowerCase() method on both the input and the database username so that they match even if the letters are not the same case structure. If both usernames match then we would move on to ask the user for the Password and compare it with the database password for that user. Since this one is case sensitive we would compare as is. Finally, if both Username and Password match we would print "Hello World" otherwise we would print "Login Failed."

3 0
2 years ago
__________, a level beyond vulnerability testing, is a set of security tests and evaluations that simulate attacks by a maliciou
True [87]

According to security evaluation, <u>Penetration testing</u> is a level beyond vulnerability testing, a set of security tests and evaluations that simulate attacks by a malicious external source (hacker).

Penetration testing is often considered or described as ethical hacking. It involves the process of securing a firm or organization's cyber defenses.

The process of penetration testing or security testing includes assessing for exploitable vulnerabilities in networks, web apps, and user security.

Hence, in this case, it is concluded that the correct answer is <u>Penetration testing.</u>

Learn more about <u>penetration testing</u> here: brainly.com/question/13137421

6 0
2 years ago
What is the best option for sharing Word documents on a Microsoft network because it provides finer degrees of versioning contro
babymother [125]

Answer:

SharePoint Server

Explanation:

One drive you are not being provided with the opportunities like the versioning, check-outs and content approval. However, through SharePoint Server, you are being leveraged with all these features. Through versioning, you can update the document anytime, and also keep track of previous versions as well as the changes that you are making. Through content approval, you can ensure various members have approved permission privilege with them regarding the publication of the content.

Through checkout and check-ins the users can have control ob the new versions of the document as well as while the check-in the document, they can comment on the changes they have made.

6 0
3 years ago
Suppose I create a new kind of Java object, called "Kangaroo". Further suppose that at any given time, all instances of this new
OLEGan [10]

Answer:

Attributes.

Explanation:

When the java object is created called "Kangaroo" and it has some properties or facts associated  with it that includes the stomach capacity,current attitude towards the pea soup and the kangaroo's location.The another name of these facts is Attributes.

Attributes are the qualities,features or properties that an entity possesses.

4 0
3 years ago
Why is it important for element IDs to have meaningful names?
wlad13 [49]

Answer:

so a program can reference it; however, it does not necessarily need an event handler

Explanation:

8 0
3 years ago
Other questions:
  • A program called the ______ combines the object program with other programs in the library and is used in the program to create
    5·1 answer
  • Which does an icon on the desktop signify?
    12·1 answer
  • Computing devices translate digital to analog information in order to process the information
    8·1 answer
  • What is sun and what does it do?
    12·2 answers
  • When addictions escalate and the individual loses his or her job or drops out of school, _______________.
    12·2 answers
  • Prompts what is a row?
    7·1 answer
  • What is the alogarithm for solving the perimeter of a triangle
    11·1 answer
  • 9. Lael wants to determine several totals and averages for active students. In cell Q8, enter a formula using the COUNTIF functi
    9·1 answer
  • When using the Photo Album dialog box, a picture
    13·2 answers
  • What is a disadvantage of communicating on social media?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!