answer.
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
VashaNatasha [74]
2 years ago
7

Match each function with its possible output.

Computers and Technology
2 answers:
hodyreva [135]2 years ago
5 0

The PLATO answer is

1. B

2. D

3. A

4. C

I just got a 100% on the test, so I am certain that is the correct answer.

mojhsa [17]2 years ago
4 0
1.) B
2.) A
3.) D
4.) C
rand command returns a random number sqrt is going to return a decimal unless its a perfect square however the rand will not the now is quite obvious because it gives a time and date, while the other simply gives the date.
You might be interested in
Create a class named BaseballGame that contains data fields for two team names and scores for each team in each of nine innings.
m_a_m_a [10]

Answer:

Check the explanation

Explanation:

BaseballGame:

public class BaseballGame {

  protected String[] names = new String[2];

  protected int[][] scores;

  protected int innings;

  public BaseballGame() {

      innings = 9;

      scores = new int[2][9];

      for(int i = 0; i < 9; i++)

          scores[1][i] = scores[0][i] = -1;

  }

 

  public String getName(int team) {

      return names[team];

  }

  public void setNames(int team, String name) {

      names[team] = name;

  }

 

  public int getScore(int team, int inning) throws Exception {

      if(team < 0 || team >= 2)

          throw new Exception("Team is ut of bounds.");

      if(inning < 0 || inning >= innings)

          throw new Exception("Inning is ut of bounds.");

     

      return scores[team][inning];

  }

  public void setScores(int team, int inning, int score) throws Exception {

      if(team < 0 || team >= 2)

          throw new Exception("Team is ut of bounds.");

      if(inning < 0 || inning >= innings)

          throw new Exception("Inning is ut of bounds.");

      if(score < 0)

          throw new Exception("Score is ut of bounds.");

      for(int i = 0; i < inning; i++)

          if(scores[team][i] == -1)

              throw new Exception("Previous scores are not set.");

     

      scores[team][inning] = score;

  }

 

}

HighSchoolBaseballGame:

public class HighSchoolBaseballGame extends BaseballGame {

  public HighSchoolBaseballGame() {

      innings = 7;

      scores = new int[2][7];

      for(int i = 0; i < 7; i++)

          scores[1][i] = scores[0][i] = -1;

  }

}

LittleLeagueBaseballGame:

public class LittleLeagueBaseballGame extends BaseballGame {

  public LittleLeagueBaseballGame() {

      innings = 6;

      scores = new int[2][6];

      for(int i = 0; i < 6; i++)

          scores[1][i] = scores[0][i] = -1;

  }

}

6 0
2 years ago
1.Which of the following class definitions defines a legal abstract class?a. class A { abstract void unfinished() { } }b. class
xxMikexx [17]

Answer:(c) abstract class A { abstract void unfinished(); }

Explanation:

A legal abstract class must have the keyword abstract before the class and an abstract class has abstract functions with the keyword abstract written and a void as the return type.

8 0
2 years ago
Write a sequence of statements that create a file named "greeting" and write a single line consisting of "Hello, World!" to that
tia_tia [17]

Answer:

The solution code is written in Python 3 as below:

  1. outfile = open("greeting.txt", "w")
  2. outfile.write("Hello World")
  3. outfile.close()

Explanation:

To create a simple text file in Python, we can use Python built-in function, <em>open()</em>. There are two parameters needed for the open() function,

  1. the file name and
  2. a single keyword "w". "w" denote "write". This keyword will tell our program to create a file if the file doesn't exist.

The statement <em>open("greeting.txt", "w")</em> will create a text file named "<em>greeting.txt</em>" (Line 1)

To fill up the content in the greeting.txt, we use <em>write()</em> method. Just include the content string as the argument of the <em>write()</em> method. (Line 2)

At last, we use <em>close() </em>method to close the opened file,<em> outfile</em>. This will release the system resource from the<em> outfile.</em>

4 0
2 years ago
It has been said that the quality of our relationships depends in large part on the quality of our
timurjin [86]

Answer:

people

Explanation:

6 0
2 years ago
There are 10 red apples and 12 green apples in a basket. If Vinta randomly selects 3 apples from the basket, what is the probabi
denpristay [2]

Answer:

12/22

Explanation:

As there are 22 apples in total and 12 green it is 12/22.

5 0
2 years ago
Other questions:
  • 3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
    13·2 answers
  • Refer to the exhibit. pc1 issues an arp request because it needs to send a packet to pc3. in this scenario, what will happen nex
    9·1 answer
  • The ________ program displays graphics and loading screens during the boot process.
    8·1 answer
  • A major weakness of a lot of file processing systems is that ____.
    10·1 answer
  • In defining security implemention, what are the roles of the following committees. 1) gateway committee 2) project committee 3)
    8·1 answer
  • What elements of SANS 20 you could leverage to reduce the TCP/IP vulnerabilities of your workstation
    9·1 answer
  • Delete Prussia from country_capital. Sample output with input: 'Spain:Madrid,Togo:Lome,Prussia: Konigsberg' Prussia deleted? Yes
    13·1 answer
  • (Displaying a Sentence with Its Words Reversed) Write an application that inputs a line of text, tokenizes the line with String
    6·1 answer
  • Does the submission include the file "SuperPower.java"? Does the file include a public class called "SuperPower"? Does the class
    13·1 answer
  • George has to present the goals of information management to his team member. What is a goal of information management? The goal
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!