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
The rules of right-of-way<br> Pedestrians, bicyclists, and skateboarders<br> when they use the road.
lorasvet [3.4K]

Whenever you are driving and you see a pedestrian, bicyclist, or skateboarder, they always have the right of way, no matter the scenario. Always give bikers 3-4 feet if possible between them and your vehicle when passing them, and always be careful around skateboarders.

I hope this helped you! Have a great day!

7 0
3 years ago
The most important task in developing a new computer system/app is to: a) choose the most current technologies such as operating
Ede4ka [16]

Answer:

c) establish a good relationship with the user and develop detailed and complete user requirements.

Explanation:

A new computer system/app is a computer software designed to perform a group of coordinated functions, tasks, or activities for the benefit of the user. It must be designed to help people carry out an activity.

6 0
3 years ago
Do debit cards allow you to draw funds directly from your checking accounts
LekaFEV [45]
Some of them do let you draw funds but not all debit cards
4 0
3 years ago
Which protocol is used for secure websites? <br> FTP<br> HTTP<br> HTTPS<br> SFTP
givi [52]
HTTPS is the answer.
Hypertext transfer protocol secure
5 0
3 years ago
A digital clock on a small cooking appliance keeps time by?
IgorLugansk [536]
They typically use the 50-60 Hz oscillation of AC power or a 32,768 hertz Chrystal oscillator to keep time. <span />
5 0
3 years ago
Other questions:
  • Respond to the following in a paragraph of no less than 125 words. What is the purpose of netiquette guidelines?
    10·1 answer
  • Create a class called Toddler that inherits from a class called Parent. (Note that Parent has already been defined elsewhere, so
    8·2 answers
  • Write a program that prompts a user to enter numeric values. As each value is entered, the program should: - Append the value to
    7·1 answer
  • 1) ________ tools gather information from sources such as e-mails, text messages, and tweets and make the information instantly
    5·1 answer
  • While performing disk and file maintenance on the company file server, you determine a user in the accounting department has bee
    13·2 answers
  • 1)What is Big Data?
    14·1 answer
  • Identifying How to Print a Record on One Page
    5·1 answer
  • 25 Points Asap <br> Write a Java program named Light.java that displays a light bulb shown below:
    14·1 answer
  • Create a function called sphereVolume that determines the volume of a sphere with a given radius and prints the result to the sc
    9·1 answer
  • Which step do you think is most useful from big data life cycle and why?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!