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
1. Discuss the pros and cons of human-computer interaction technology?
Lana71 [14]

!

gcoo!!Exykgvyukhhytocfplanationufvhyg:

3 0
3 years ago
As you apply to college when should you apply for financial aid
Nataliya [291]

Answer:

after you are accepted in the college

Explanation:

You should apply for admission to the colleges you are interested in BEFORE filing your FAFSA. Once you are accepted to the colleges you have applied to, you can add those schools to receive financial aid award offers from when you file your FAFSA.

4 0
3 years ago
Wireshark capture files, like the DemoCapturepcap file found in this lab, have a __________ extension, which stands for packet c
VashaNatasha [74]

Answer:

Option (d) is correct

Explanation:

Previously saved capture files can be read using Wireshark. For this, select the File then open the menu. Then Wireshark will pop up the “File Open” dialog box.

Wireshark capture files, like the DemoCapturepcap file found in this lab, have a .pcapng extension, which stands for packet capture, next generation.

5 0
2 years ago
You want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you shoul
nikklg [1K]

If you want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you should type chmod a <u>t  <subdir>.</u>

<h3>What is Subdir?</h3>

The Definition of the term subdirectory is known to be a kind of an organizational directory that can be seen on a computer.

It is known to be one that can be found inside another directory  such as a subfolder. It is seen as the file a person is looking for and it is one that needs to have an extension.

Therefore, if you want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. to do so, you should type chmod a <u>t  <subdir>.</u>

Learn more about directory from

brainly.com/question/14845522

#SPJ1

See full question below

You want to set the sticky bit on an existing directory, subdir, without otherwise altering its permissions. To do so, you should type:

chmod a+_____ <subdir>

- s

- p

- b

- t

6 0
1 year ago
Where should a "deny all catch all" rule be positioned and why?<br> pleaseeee help!
insens350 [35]

Answer: For best performance and lowest latency, the MMU and CPU should support hardware ... broadcast, and subnet broadcast traffic with the deny-all catch-all filter rule for ... Please refer to the NetSight Wireless Manager User Guide (v5.1 or higher ) for a ... The rule must also be positioned above the 'Deny All' Default action.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which statement is true regarding the Quick Access toolbar?
    11·2 answers
  • What are 3 characteristics of syndrome E?
    13·1 answer
  • What is wrong, logically, with the following code? if (x &gt; 10) System.out.println("Large"); else if (x &gt; 6 &amp;&amp; x &l
    11·1 answer
  • What are the commands used in windows 2012 to mount the nfs share on the linux server?
    8·1 answer
  • What is constructive criticism?
    9·1 answer
  • Obtain a file name from the user, which will contain data pertaining to a 2D array Create a file for each of the following: aver
    5·1 answer
  • You recently started working part-time in a retail store, and are learning about the reading devices your store uses. Your store
    6·1 answer
  • Display the total number of parking tickets.
    5·1 answer
  • A ______ is a portable device for recording audio and video.
    10·2 answers
  • How would you describe<br> "analogous color harmony" to a six year old?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!