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
What is the purpose of social networking sites
ipn [44]

Explanation:

social networking sites allow users to share ideas, digital photos and videos, posts, and to inform others about online or real world activities and events with people in their network.

6 0
3 years ago
Which of the following does a histogram resemble the most?
jolli1 [7]
C bar graph is closer to a histogram
8 0
4 years ago
True / False
Tju [1.3M]

Answer:

TRUE, The PC is always incremented by the same amount in fixed-length instruction set architectures.

Explanation:

Its TRUE that Program Counter ( PC ) is always incremented by the same amount in fixed - length instruction set architectures ( fixed length ISA) . As the instruction set length is fixed in fixed - length instruction set architectures, the Program Counter to fetch the next instruction set it has to be incremented by fixed length. This fixed length depends on the hardware of the architecture (the number of bytes each machine word contains and number of machine words per memory location)

7 0
4 years ago
) Using newline command : endl
Pavlova-9 [17]

Answer:

The output of the code is following:-

My first C++ program.

The sum of 2 and 3 = 5

7 + 8 = 15

Explanation:

First the program should have #include<iostream>.This is missing in the program.

In the program you have printed My first C++ program first then used newline character endl. After that you have printed The sum of 2 and 3 = 5 this will be printed in the new line.Then you have used endl.Then printed  "7 + 8 = " string and the sum 7+8 that is 15.

Hence the output is like this.

6 0
3 years ago
The following SQL statement contains what type of subquery? SELECT b.title, b.retail, a.category, a.cataverage FROM books b, (SE
Sedbober [7]

Answer:

Inline view.

Explanation:

Inline view:-It is not a real view instead it is a sub-query or a SELECT statement in the FROM clause of the of another select statement.In the query provided we have a sub - query which is displaying category and Average of retail from the books table and this query is present in the FROM clause of other SELECT statement.

3 0
4 years ago
Other questions:
  • You just realized the turn signal on your vehicle is broken,
    15·1 answer
  • ​the unified modeling language (uml) represents an object as a _____ with the object name at the top, followed by the object's a
    7·1 answer
  • Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
    8·1 answer
  • Why are high-quality transformers wound with large diameter wire?
    8·1 answer
  • In a nondatabase, file-oriented environment, data is often partitioned into several disjointed systems with each system having i
    11·1 answer
  • Arrange the types of movies in terms of the amount of content they can hold
    14·1 answer
  • What frequency band or bands do 802.11g, 802.11a, 802.11n, and 802.11ac use?
    13·1 answer
  • You've run 200 ft of cable and lost 7dB. What is the loss rate of your cable per 100 ft?
    14·1 answer
  • AI is not embraced everywhere in every industry because _______.
    7·1 answer
  • Do you need to have java on your computer.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!