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
nalin [4]
3 years ago
12

One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input

, and outputs the number of laps. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: System.out.printf("%.2f", yourValue); Ex If the input is: 1.5 the output is: 6.00 Exc If the input is: 2.2 the output is: 8.80 Your program must define and call a method: public statie double milestoLaps (double userkiles) LAB ACTIVITY 6.23.1 LAB Miles to track laps 0/10 LabProgram java Lood default template1 import java.util.Scanner; 2 3 public class LabProgram 4 5 public static double wiles Tolaps(double userMiles) 6 return userMiles / 0.25; 7 89 10 Scanner in new Scanner (System.in); 11 System.out.printf(x 27, wilestoLaps(in.nextDouble()); 12 }13 14 }15
Computers and Technology
1 answer:
postnew [5]3 years ago
4 0

Answer:

import java.util.Scanner;

public class LapToMiles {

   public static void main(String[] args) {

       System.out.println("Enter Number of Miles");

       Scanner in = new Scanner(System.in);

       double numMiles = in.nextDouble();

       double numberOfLaps = milestoLaps(numMiles);

       System.out.printf("%.2f",numberOfLaps);

   }

   public static double milestoLaps(double numMiles){

       //One lap = 0.25 miles

       double numberOfLaps = numMiles/0.25;

       return numberOfLaps;

   }

}

Explanation:

Create a Method milestoLaps that converts number of laps to number of miles

Within the main method call milestoLaps and pass your entered value for miles

format the output with printf()

You might be interested in
All of the following except one are issues that should be covered in an AUP. Which one is the exception?
Maslowich

Answer:

D) Your computer monitor will not switch on.

Explanation:

A written agreement or a document stipulating constraints and practices that a community computer network or an individual user must agree and adhere to is called an Acceptable Use Policy (AUP). Employees and students are required to sign an AUP when you sign up with an ISP. A good AUP will cover most provisions for network etiquette and indicate clearly the privacy levels of a member. The examples given in the multiple choices above are use cases for AUP apart from option D. If a user is not certain on the actions that should be taken in use cases like these, an AUP should be of great help.

6 0
2 years ago
Which keyboard shortcut cuts information to the clipboard?
anyanavicka [17]

Answer:

control X

Explanation:

It cuts and copies to clipboard

3 0
3 years ago
A ________ algorithm is a method of locating a specific item of information in a larger collection of data.
pav-90 [236]
A .) Sort

more ... To arrange or group in a special way (such as by size, type or alphabetically).
6 0
3 years ago
? Assessment
Ksivusya [100]

Answer:

Her performance over the course of  a season.

Explanation:

An athlete is signed for a season. These days each aspect of an athlete is noted through the effective use of the best technology. However, for detailed study, one or several plays, and certainly not the second half of a game is enough. It's required to collect the details for a complete season. And that is possible, as an athlete is hired for a season. And through such a detailed data set of a complete season, we can now train a machine as well, and it will let the athlete know where she is going wrong. And thus she can improve and remove those faults from her game, and become a better athlete. And even for a coach, one complete season is required, though when he has not seen her playing before that season. It's assumed that this is her first season. All the options mentioned are good, but the best is certainly the one with complete details, and that is a complete season. The rest is good but not the best.

4 0
3 years ago
Que Inventos Importantes se Crearon durante la edad de agua y viento
ss7ja [257]

Answer:

Sep 24, 2016 · Que inventos importantes se crearon durante la edad del agua y el viento Recibe ahora mismo las respuestas que necesitas!

Explanation:

3 0
2 years ago
Other questions:
  • Interpretations of​ Moore's law assert​ that:
    13·1 answer
  • #TODO: Define a data structure to keep track of which links are part of / not part of the spanning tree.
    14·1 answer
  • Cryptolocker is an example of what type of malware?
    11·1 answer
  • You can create a database using one of the many templates available or by creating a new ______ database.
    9·1 answer
  • A parameter is a numerical measure that describes a characteristic of a sample. Choose One • 4 points True False
    6·1 answer
  • A method that receives a two-dimensional array uses two ____ pairs following the data type in the parameter list of the method h
    11·1 answer
  • Is it safe to take apart a computer monitor?
    13·1 answer
  • When installing a device driver, start the computer in
    6·1 answer
  • A browser allows you to set preferences for using the browser. These preferences include all of the following except
    7·1 answer
  • Brainly not working for me not showing any ads or answers
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!