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
seropon [69]
3 years ago
9

Summary

Computers and Technology
1 answer:
Nataly_w [17]3 years ago
8 0

Answer:dddd

Explanation:

//The code is all written in Java and here are the three classes in order ReportDriver, RaceReport, and Race

class ReportDriver {

   

   public static void main(String[] args) {

       boolean continueRace = true;

       Scanner in = new Scanner(System.in);

       ArrayList<ArrayList<Integer>> races = new ArrayList<>();

       while (continueRace == true) {

           System.out.println("Would you like to enter into a race? Y or N");

           char answer = in.next().toLowerCase().charAt(0);

           if (answer == 'y') {

               Race race = new Race();

               races.add(race.Race());

           } else {

               break;

           }

       }

       for (int x = 0; x <= races.size()-1; x++) {

           RaceReport report = new RaceReport();

           report.RaceReport(races.get(x));

           report.printRange();

           report.printAverage();

       }

   }

}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package sample;

import java.util.ArrayList;

public class RaceReport {

   int range, average;

   String first, second, third;

   public void RaceReport(ArrayList<Integer> times) {

       if (times.get(2) == times.get(1)) {

           if (times.get(2) == times.get(0)) {

               System.out.println(first = "Times tied for first place are " + times.get(2) + " and " + times.get(1) + " and " + times.get(0));

           } else {

               System.out.println(first = "Times tied for first place are " + times.get(2) + " and " + times.get(1));

               System.out.println(second = "Second place time is " + times.get(0));

           }

       } else if (times.get(1) == times.get(0)) {

           System.out.println(first = "First place time is " + times.get(2));

           System.out.println(second = "Times tied for Second place are " + times.get(1) + " and " + times.get(0));

       } else {

           System.out.println(first = "First place time is " + times.get(2));

           System.out.println(second = "Second place time is " + times.get(1));

           System.out.println( third = "Third place time is " + times.get(0));

       }

       range = Math.abs(times.get(0) - times.get(2));

       average = (times.get(2) + times.get(1) + times.get(0) / 3);

   }

   public void printRange() {

       System.out.println("The range of the race was " + range);

   }

   public void printAverage() {

       System.out.println("The average of the race was " + average);

   }

}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

package sample;

import java.util.ArrayList;

import java.util.Collections;

import java.util.Scanner;

public class Race {

   Scanner in = new Scanner(System.in);

   ArrayList<Integer> times = new ArrayList<>();

   public ArrayList<Integer> Race() {

       System.out.println("Input time 1:");

       times.add(in.nextInt());

       System.out.println("Input time 2:");

       times.add(in.nextInt());

       System.out.println("Input time 3:");

       times.add(in.nextInt());

       Collections.sort(times);

       return times;

   }

}

You might be interested in
Which top-level domain can be used by anyone, regardless of their affiliation?
Firdavs [7]

Answer:

C. org

Explanation:

org is an open domain so anyone is allowed to register a .org domain

7 0
2 years ago
You trained a binary classifier model which gives very high accuracy on thetraining data, but much lower accuracy on validation
kompoz [17]

Answer:

a. This is an instance of overfitting.

Explanation:

In data modeling and machine learning practice, data modeling begins with model training whereby the training data is used to train and fit a prediction model. When a trained model performs well on training data and has low accuracy on the test data, then we say say the model is overfitting. This means that the model is memorizing rather Than learning and hence, model fits the data too well, hence, making the model unable to perform well on the test or validation set. A model which underfits will fail to perform well on both the training and validation set.

4 0
3 years ago
What is the decimal format of the binary IP address 11001110.00111010.10101010.01000011?
Neporo4naja [7]

Answer:

206.58.170.67 is the decimal format of the given binary IP address.

Explanation:

we can convert the binary number into decimal by the following procedure.

11001110 = 1x2⁷+1x2⁶+0x2⁵+0x2⁴+1x2³+1x2²+1x2¹+0x2⁰

            = 128 + 64 + 0 + 0 + 8 + 4 + 2 + 0

            =   206

00111010 = 0x2⁷+0x2⁶+1x2⁵+ 1x2⁴+1x2³+0x2²+1x2¹+0x2⁰

               = 0 + 0 + 32 + 16 + 8 + 0 + 2 + 0

               = 58

10101010 = 1x2⁷+0x2⁶+1x2⁵+ 0x2⁴+1x2³+0x2²+1x2¹+0x2⁰

              = 128 + 0 + 32 + 0 + 8 + 0 + 2 + 0

              = 170

01000011 =  0x2⁷+ 1x2⁶+ 0x2⁵+ 0x2⁴+ 0x2³+0x2²+1x2¹+1x2⁰

                = 0 + 64 + 0 + 0 + 0 + 0 + 2 + 1

                =  67

so, the IP address is becomes 206.58.170.67

7 0
3 years ago
I didn't go to school today and i want to know if my teacher would contact my parents.
AURORKA [14]

the school will call your parents

6 0
3 years ago
Consider a multilevel computer in which all levels are different. Each level has instructions that are m times as powerful as th
Leona [35]

Answer:

Following are the responses to the given question:

Explanation:

Its machine slows for each further level of evaluation by an n/m factor. Therefore are the times for implementation for levels 2, 3, and 4 are \frac{kn}{m} \ and\  \frac{kn^2}{m^2} \ and \ \frac{kn^3}{m^3}.

So, the level values are:

level \ 2 = \frac{kn}{m}\\\\level \ 3 = \frac{kn^2}{m^2}\\\\level \ 4 = \frac{kn^2}{m^2}\\\\

7 0
3 years ago
Other questions:
  • When powering up the computer, the initial program loading and start-up is performed by using a ______________ program that is b
    14·1 answer
  • Write a statement that reads 5 successive integers into these variables that have already been declared : x1 x2x3x4 x5. Then wri
    7·1 answer
  • What is the difference between a fragment shader and vertex shader? How do they relate?
    8·1 answer
  • What activities are the most likely to infect your computer with a virus? Check all that apply
    11·2 answers
  • In a ring-based system, procedure p is executing and needs to invoke procedure q. Procedure q's access bracket is (5,6,9). In wh
    15·2 answers
  • A computer lab has two printers. Printer I handles 40% of all the jobs. Its printing time is Exponential with the mean of 2 minu
    8·1 answer
  • Data as a service began with the notion that data quality could happen in a centralized place, cleansing and enriching data and
    15·1 answer
  • On his computer desktop, Rodney can see several different files, each immediately accessible. Because he is actively working on
    13·1 answer
  • write a program that calculates the total grade for N classroom exerices as a perfentage. the user should input the value for N
    11·1 answer
  • In the following code: function drawCircle(radius, x, y, color) { var circle = new Circle(radius); circle.setPosition(x, y); cir
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!