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]
4 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]4 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
Use MPLAB to write an asemply program to multipy two numbers (11111001) and (11111001). Then save the product in file reisters 0
kari74 [83]
3.148085752161e17
-should be right,did my best
5 0
3 years ago
A table is a predesigned database that includes professionally designed database objects.
Nikitich [7]
This statement is not true. A table is defined as a collection of related records.
7 0
3 years ago
\Read the sentence.
Vinvika [58]

Answer: it should be A

Explanation: theirs is describing he\she owns the car

If I'm wrong tell me thank you.

4 0
3 years ago
As a sports store owner, the higher the price you charge for gear...
Nitella [24]
2 that’s because some people will buy it because they think the value of it is good and some might not because they believe it is too expensive.
8 0
3 years ago
Read 2 more answers
I have a DBA for keyboarding coming up and I am nervous. Any tips or pointers?
Gennadij [26K]
Don't be nervous... haha
3 0
3 years ago
Read 2 more answers
Other questions:
  • The Maui coffee shop sells coffee at $10.50 a pound plus the cost of shipping. Each order ships for $0.86 per pound + $1.50 fixe
    14·1 answer
  • Hello I'm new to coding and in my class, we have jumped straight into coding with zero experience and or lessons, this is my fir
    14·1 answer
  • How does acceleration differ from velocity?
    15·1 answer
  • A void function can return any value. TRUE FALSE
    8·1 answer
  • The term _____________ refers to software license agreements that are included within a box of physical-media software.
    9·1 answer
  • I need the answer ASAP. I’ll mark brainliest if right
    5·1 answer
  • I need help with computer science<br> the quiz on e2020 is on hackers and unauthorized access
    15·2 answers
  • According to the video, which tasks do Police Patrol Officers perform? Select all that apply.
    15·2 answers
  • Which insert image option allows a user to insert images from the internet?
    5·2 answers
  • Can we use a data type as a condition in C++?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!