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
alisha [4.7K]
3 years ago
8

1. Create an interface called Runner. The interface has an abstract method called run() that display a message describing the me

aning of "run" to the class. Create classes called Machine, Athlete, PoliticalCandidate that all implement Runner. Create an application that demonstrates the use of the classes. Save the files as Runner.java, Machine.java, Athlete.java, PoliticalCandidate.java and DemoRunners.java
Computers and Technology
1 answer:
Colt1911 [192]3 years ago
7 0

Answer:

see explaination for program code

Explanation:

interface Runner

{

public abstract void run();

}

class Machine implements Runner

{

public void run()

{

System.out.println("Machine is running");

}

}

class Athlete implements Runner

{

public void run()

{

System.out.println("Athlete is running");

}

}

class PoliticalCandidate implements Runner

{

public void run()

{

System.out.println("Political Candidate is running");

}

}

class DemoRunners

{

public static void main (String[] args)

{

Machine m = new Machine();

m.run();

Athlete a = new Athlete();

a.run();

PoliticalCandidate pc = new PoliticalCandidate();

pc.run();

}

}

You might be interested in
1. A formula =A1+B2 is in cell D8. If you copy that formula to cell D9, what is the new formula in cell D9?
MaRussiya [10]
1. Answer is B   (D9=<span>A2+B3)
2. </span><span>C. identifies how many cells with data were in the range 
3. </span><span>A. ascending (smallest to largest)
</span><span>4. A. the current worksheet </span>
6 0
3 years ago
Why should you follow-up with your interviewer after a job interview?
elixir [45]

B. To reinforce your interest in the position and thank your interviewer


8 0
3 years ago
Read 2 more answers
There are three types of operators in BASIC-256 <br>a) True b) False​
Anestetic [448]

Answer:

a)True is the answer......

6 0
3 years ago
Write a program that allow a customer to input the value of goods bought, The program should then decide the discount to give a
Thepotemich [5.8K]

Answer:

geeksforgeeks is the answer

5 0
2 years ago
One way to make a data table stand out on the screen and help bring the viewer’s attention to it is to add a shadow behind the t
olganol [36]
A user can add a shadow to a table on Power Point presentation, b<span>y choosing the Layout tab under Table Tools, clicking on Effects, and selecting Shadow. The shadow can be inner, outer or perspective. The most commonly used is outer shadow.
</span>Adding a shadow behind the table will make the <span>data table to stand out on the screen and help bring the viewer’s attention.
Shades can be added also on text, tables, pictures inserted in the presentation and other object. </span>
7 0
3 years ago
Read 2 more answers
Other questions:
  • To use files in a c++ program you must include the ________ header file.
    15·1 answer
  • William has an internet connection that does not allow him to make calls when connected to the internet. what internet service c
    7·2 answers
  • Which do web servers host?<br> Websites<br> Networks<br> Firewalls<br> Zones
    8·1 answer
  • Hi weegy, what is the latest android os?
    9·1 answer
  • Listed here are a few camera angles and their images.
    10·1 answer
  • 45 points!!
    15·2 answers
  • If you use a new HTML5 input type (such as "range" or "number") on an older browser,
    12·1 answer
  • Write a program that prints the U.S. presidential election years from 1792 to present day, knowing that such elections occur eve
    13·1 answer
  • _________________ uses soap or detergent to physically remove germs, dirt, and impurities from surfaces or objects.
    13·1 answer
  • A block signature indicating that a text message was typed on a mobile device is an example of ____________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!