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);
}
}
what is Service Operations in ITIL
Explanation:
the objective of ITIL service operations is to make sure that IT services are delivered effectively and efficiently. the service operation life cycle stage includes the fulfilling of user requests, resolving service failure fixing problems and also carrying out routine operational tasks
A have a string, called "joshs_diary", that is huge (there was a lot of drama in middle school). But I don't want every one to know that this string is my diary. However, I also don't want to make copies of it (because my computer doesn't have enough memory). Which of the following lines will let me access this string via a new name, but without making any copies?
a. std::string book = joshs_diary;
b. std::string & book = joshs_diary; const
c. std::string * book = &joshs_diary;
d. std::string book(joshs_diary);
e. const std::string & book = joshs_diary;
f. const std::string * const book = &joshs_diary;
g. std::string * book = &joshs_diary;
Answer:
C and G
Explanation:
In C language, the asterisks, ' * ', and the ampersand, ' & ', are used to create pointers and references to pointers respectively. The asterisks are used with unique identifiers to declare a pointer to a variable location in memory, while the ampersand is always placed before a variable name as an r_value to the pointer declared.
help me plzz thank you if your right I will mark brainiest
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:
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.
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:
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:
The two statements belowchar dance1[ ] = {'F','o','x','t','r','o','t'};String dance2 = new String(dance1);will generate an error message:
a. because char variables and String variable do not mix.
b. will generate an error message because char variables and String variable do not mix.
c. show that a String variable, like dance2, is an array.
d. demonstrate that a character array can be used to construct a String object.
e. prove that character variables and String variables are identical.
Answer:
D. Demonstrate that a character array can be used to construct a String object.
Explanation:
Option D answers the question.
This is so because:
The first line of the code segment creates a char array element i.e. dance1
The second line of the code segment creates a String variable, dance2.
dance2 is then initialised by concatenating the elements in dance1.
i.e. The value of dance2 is
dance2 = "Foxtrot"
Hence, option D answers the question