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
tatuchka [14]
3 years ago
12

Suppose Animal is an interface that specifies a single method – speak. Now suppose the Dog class implements the Animal interface

. In addition to the speak method, the Dog class also has a method called wagTail. Now consider the following code.
Animal a = new Dog();
a.wagTail();
Which of the following is true about this code?
a) It will result in a compile-time error.
b) It will result in a run-time error.
c) It will call the speak method defined in the Animal interface.
d) It will call the wagTail method defined in the Dog class.
e) none of the above are true.
Computers and Technology
1 answer:
Finger [1]3 years ago
7 0

Answer / Explanation

To properly answer this question, let us define some basic terms within the narrative of the question.

This includes:

Speak Method: This is a type of java script or programming language syntax or method. The speak method usually denoted by the symbol () is a form of of Speech combination or the combination of components of different speech or elements to form a whole speech method. it is an interface that  adds an utterance to the utterance queue and  it will be spoken when any other utterances queued before it have been spoken.

Now, referencing the definition of speak method above and relating to the the options given as an output in the codes written in the answer options,

The answer here is (a) that is it will fail to comply which is equivalent to the option of it resulting to a compile time error.

You might be interested in
Which words in the sentence make up the adjective phrase? Which word does the adjective phrase modify? The farmer delivers five
jasenka [17]
B....."........."........"...
6 0
3 years ago
A_________is a way for students to keep track of information during research.
Fudgin [204]
Note pad your welcome


4 0
3 years ago
Write a program with a car's miles/gallon and gas dollars/gallon (both floats) as input, and output the gas cost for 10 miles, 5
omeli [17]

Answer:

The Following are the code to this question:

def cost(miles, milesPerGallon, dollarsPerGallon):##defining a method cost that accepts three parameter

   return miles / milesPerGallon * dollarsPerGallon# calculate cost and return it value  

milesPerGallon = float(input('Enter miles/Gallon value: '))#defining variable milesPerGallon for user input  

dollarsPerGallon = float(input('Enter dollars/ Gallon value: '))#defining variable dollarsPerGallon for user input

print('{:.5f}'.format(cost(10, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.5f}'.format(cost(50, milesPerGallon, dollarsPerGallon)))#call method and print its value

print('{:.3f}'.format(cost(400, milesPerGallon, dollarsPerGallon)))#call method and print its value

Output:

Enter miles/Gallon value: 20.0

Enter dollars/ Gallon value: 3.1599

1.57995

7.89975

63.198

Explanation:

In the above-given code, a method "cost" is defined, that accepts three value "miles, milesPerGallon, and dollarsPerGallon" in its parameter, and use the return keyword for calculating and return its value.

In the next step, two variable "milesPerGallon, and dollarsPerGallon" is declared, that use the input method with float keyword for input floating-point value.

After input value, it uses a print method with different miles values, which are "10,50, and 400", and input value to pass in cost method to call and print its return value.

5 0
3 years ago
In Rizzati Corp, vice presidents in departments such as engineering, manufacturing, IT, and human resources report directly to t
Harrizon [31]

Answer: <em>Functional organizational structure.</em>

Explanation:

From the given case/scenario, we can state that Rizzati Corp has a functional organizational structure. Functional organizational structure is referred to as a structure which is used in order to organize employees. The employees are mostly grouped or organized based on their knowledge or specific skills. It tends to vertically structure each and every department or staff with specific roles from VP to sales and finance departments, to worker assigned to commodities or services.

7 0
3 years ago
Troy, an aspiring screenwriter, aspires to work with a famous director known for his philanthropic work. Troy gets an appointmen
kicyunya [14]

Troy should include a short overview of the story that his video will tell and why he wants to tell it (or what the video will be about and why). It should also include the target audience, and where the video will be published.

7 0
3 years ago
Other questions:
  • How do humans feel about being abducted?
    12·2 answers
  • How many different integers can be represented with a 4-digit number in base 13?
    8·1 answer
  • Application Software include programs like: MS Word, Google Docs, MS Exce ect...
    13·1 answer
  • You are given two processors P1 and P2 that execute the same instruction set but have different architectures. The instructions
    9·1 answer
  • Pls help me
    5·1 answer
  • Often technical personnel who are not familiar with security techniques think that restricting access to ports on a router or fi
    5·1 answer
  • As part of a team, you are assigned to create a financial report. One of your tasks is to put the pieces together as other team
    5·1 answer
  • Select the correct word to complete the sentence.
    8·1 answer
  • There u go i did thereeeeeeeeeeeeeeeeeeeeeee
    13·2 answers
  • I WILL GIVS BRAINLIEST IF U ANSWER THIS
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!