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]
4 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]4 years ago
6 0

Answer:

public int createLicenseNum(int customID){

  licenseNum = (100000 * customID) + licenseYear;

  return(licenseNum);    

}

Explanation:

g100num [7]4 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
Which of the following best describes
Nookie1986 [14]

Answer:

answer is a spreadsheet

7 0
3 years ago
Philip is thinking about customizing his motorcycle. A paint job, saddlebags, and a radio would cost $600. His motorcycle is old
Vladimir [108]

Answer:

He will temporarily have less money in his bank account.

Explanation:

Philip will have less money in his bank account at this time because he is considering modifying his motorcycle that costs approx $600, but his bike older and he also understands that he required a new bike in the next two years.

So, he decided to make an analysis table according to his choice and after that, he examines that if he tailored his bike at this time then he has a shortage of money at the time of purchasing a new bike.

3 0
3 years ago
Read 2 more answers
Snippet 1: check_file_permissions.c #include
vitfil [10]

Answer:

I don't know  you should figure that out good luck

Explanation:

good luck

3 0
3 years ago
Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
NNADVOKAT [17]

Answer: Carbon Monoxide and Tar.

4 0
3 years ago
In a _____ network, each device on the network is attached to a central server. If the server fails, then the other devices will
Tresset [83]
Answer: star

Explanation: A star network topology is an implementation of a spoke–hub distribution paradigm in computer networks. In a star network, every host is connected to a central hub. In its simplest form, one central hub acts as a conduit to transmit messages. The star network is one of the most common computer network topologies.
5 0
3 years ago
Other questions:
  • What is special about the f and j keys on a standard keyboard?
    15·2 answers
  • Never mind I got it
    8·2 answers
  • Whenever I go onto Google Chrome, the words are in Spanish! How can I make the words be back in English again? Please let me kno
    7·1 answer
  • Which of the following payment types require you to pay upfront?
    9·1 answer
  • A binary message consisting of four bits was sent to you by a friend. The message was supposed to be ABAB. Unfortunately, your f
    8·1 answer
  • Consider a system consisting of m resources of the same type, being shared by n processes. Resources can be requested and releas
    13·1 answer
  • Hi All,
    12·2 answers
  • Declare an ArrayList of Strings. Add eight names to the collection. Output the Strings onto the console using the enhanced for l
    9·1 answer
  • What are 3 examples of a idler gear in real life?
    7·1 answer
  • Which of the following items in the folder window allows users to view locations which have been visited before?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!