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 the type of gameplay seen during early video games (ex. Spacewar!, Pong).
Alexeev081 [22]

Answer:

Computer scientists began building rudimentary games and simulations on mainframe computers in the 1950s and 1960s, with MIT's Spacewar! in 1962 being one of the first such games to be played with a video display. The first consumer-ready video game hardware arrived in the early 1970s, with the Magnavox Odyssey, the first home video game system, and the first arcade video games from Atari, Computer Space and Pong, the latter of which was later transformed into a home console version. Pong's success in arcades and at home prompted numerous firms to create clones of the game, resulting in a market contraction in 1978 owing to oversaturation and a lack of innovation.

8 0
2 years ago
Blogs differ from most other online text sources because they
allochka39001 [22]
Tell you what a person's life is like
4 0
3 years ago
Read 2 more answers
Which website can help you find antivirus software?
sdas [7]
McAfee!!! you should get it
3 0
3 years ago
Read 2 more answers
If you created a variable called name, what data type would that value be?
NNADVOKAT [17]
<h2>Answer:</h2>

<h2>A float</h2>

Hope it helps

6 0
3 years ago
Read 2 more answers
Do all accounts serve the same function? Why or why not?
lora16 [44]

The correct answer is D. No, accounts serve the purpose that their owners choose.

There are different types of bank accounts which are for saving, fixed deposit account, current account, and recurring account.

Basic banking provides amount of customers with a banking comfort.

They also provide cistomer and secure friendly environment.

3 0
2 years ago
Read 2 more answers
Other questions:
  • Which OS function does a CLI fulfill? A User interface B Running applications C Hardware interface D Booting
    12·1 answer
  • Zara is designing a slide with a numbered label on a picture. She wants the number to appear when the she presses a button on th
    11·2 answers
  • Fill the validateForm function to check that the phone number contains a number (use the isNaN function) and that the user name
    8·1 answer
  • Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in t
    6·1 answer
  • NEED HELP RIGHT NOW!!! Which of the following is the definition of a privacy policy? * 5 points - A legal document that an app o
    6·1 answer
  • Just help :(((((((((((((((((((((((((((((((((((
    14·1 answer
  • How do you think electronic spreadsheets have transformed businesses today?​
    6·1 answer
  • imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr
    12·1 answer
  • mary has access to certain resources because she is in the Research division of her company. She has access to other resources b
    15·1 answer
  • What is bigger that terbites
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!