Computers and Technology, 19.10.2020 22:01 amanda2517
Create an interface called Runner. The interface has an abstract method called run() that displays a message describing the meaning of run to the class. Create classes called Machine, Athlete, and PoliticalCandidate that all implement Runner.
The run() should print the following in each class:
Machine - When a machine is running, it is operating.
Athlete - An athlete might run in a race, or in a game like soccer.
PoliticalCandidate - A political candidate runs for office.
public class Athlete implements Runner
{
public void run()
{
// write your code here
}
}
public class DemoRunners
{
public static void main(String[] args)
{
Machine runner1 = new Machine();
Athlete runner2 = new Athlete();
PoliticalCandidate runner3 = new PoliticalCandidate();
runner1.run();
runner2.run();
runner3.run();
}
}
public class Machine implements Runner
{
public void run()
{
// write your code here
}
}
public class PoliticalCandidate implements Runner
{
public void run()
{
// write your code here
}
}
public interface Runner
{
// write your code here
}
Answers: 1
Computers and Technology, 23.06.2019 11:00, jaygamer37
What is the name of the sound effect that danny hears
Answers: 1
Computers and Technology, 23.06.2019 21:00, webbjalia04
Uget brainliest if accurate mary has been given the responsibility of hiring a person for the position of a software testing officer. which management function would mary achieve this responsibility?
Answers: 1
Create an interface called Runner. The interface has an abstract method called run() that displays a...
English, 03.09.2020 03:01
Physics, 03.09.2020 03:01
Mathematics, 03.09.2020 03:01
Computers and Technology, 03.09.2020 03:01
Advanced Placement (AP), 03.09.2020 03:01