Answer:
the 1,2, and 3 are the second circle thingy and the fourth question is the first circle thing and dont know the last one hope this helps
Explanation:
How many components does a network have ?
Answer:
There are three primary components to understanding networks: 1. Physical Connections; 2. Network Operating System; and 3. Application Component. Hope this helps!
Explanation:
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
}
----------------------------------------------------------------------------------------------------
Answer:
Here is the interface Runner:
public interface Runner { //interface Runner
public abstract void run(); } //abstract method run that displays a message describing the meaning of run to the class
/*Here Runner is the interface which is an abstract class. It is used to group related methods such as here is run method with empty body. An abstract method run() does not have a body. The body is provided by the sub classes Machine, Athlete, and PoliticalCandidate that all implement Runner. */
Explanation:
Here is the Athlete class:
public class Athlete implements Runner { //class that implements Runner interface
public void run() { //interface method accessed by Athlete to provide its body according to describe the meaning of run to the class
System.out.println("An athlete might run in a race, or in a game like soccer."); } } //prints this message
Here is the Machine class:
public class Machine implements Runner {
public void run() {
System.out.println("When a machine is running, it is operating."); }}
Here is the PoliticalCandidate class:
public class PoliticalCandidate implements Runner {
public void run() {
System.out.println("A political candidate runs for office."); } }
/*To access the interface Runner method run(), the Runner must be "implemented" by Machine, Athlete, and PoliticalCandidate classes with the implements keyword. The body of the interface method run() is provided by the "implement" class */
Here is the DemoRunners class:
public class DemoRunners { //class name
public static void main(String[] args) { //start of main method
Machine runner1 = new Machine(); //creates object of Machine class
Athlete runner2 = new Athlete(); //creates object of Athlete class
PoliticalCandidate runner3 = new PoliticalCandidate(); //creates object of PoliticalCandidate class
runner1.run(); //uses object of Machine class to call run method
runner2.run(); //uses object of Athlete class to call run method
runner3.run(); } } //uses object of PoliticalCandidate class to call run method
When runner1.run() is called it invokes the run() method of class Machine which displays the message:
When a machine is running, it is operating.
When runner2.run() is called it invokes the run() method of class Athlete which displays the message:
An athlete might run in a race, or in a game like soccer.
When runner3.run() is called it invokes the run() method of class PoliticalCandidate which displays the message:
A political candidate runs for office.
The screenshot of the program is attached.
James uses a database to track his school's football team. Which feature in a database allows James to find a specific player by name?
Grid
Filter
Search
Sort
Answer:
search
Explanation:
Main topics: Basic Java program
Programmatic output
Arithmetic Expressions
User input
Program Specification:
Write a Java program that calculates and outputs a baseball pitcher’s ERA in a reasonable report format. "ERA" is an acronym for "earned run average" and is computed using the following equation: number of earned runs multiplied by 9 and divided by number of innings pitched Your program must do the following: • Prompt the user for the first and last name of the pitcher and store them in two variables of type String • Prompt the user for the pitcher’s number of earned runs and store it in a variable of type int • Prompt the user for the pitcher’s number of innings pitched and store it in a variable of type int • Compute and output the pitcher’s ERA, which should be a (double) floating point number Sample run(s): Pitcher’s first name: Josh Pitcher’s last name: Hader Number of earned runs: 22 Number of innings pitched: 81 Josh Hader has an ERA of 2.4444444444444446
Answer:
Explanation:
import java.util.Scanner;
public class pitcherValues {
public static void main(String[] args) {
String firstName, lastName;
int earnedRuns, inningsPitched;
double ERA;
Scanner in = new Scanner(System.in);
System.out.println("Pitchers First Name is?");
firstName = in.nextLine();
System.out.println("Pitchers Last Name is?");
lastName = in.nextLine();
System.out.println("How many runs did the Pitcher earn?");
earnedRuns = in.nextInt();
System.out.println("How many innings did the Pitcher Pitch?");
inningsPitched = in.nextInt();
ERA = (earnedRuns * 9) / inningsPitched;
System.out.println(firstName + " " + lastName + " has an ERA of " + ERA);
}
}