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
I need like 10 sentences to delineate and discuss societal issues related to computing . “Including the guiding principles of pr
beks73 [17]

Answer:

Kindly check Explanation

Explanation:

Advancement in technology spurred largely due to the advent of the computer and internet has resulted in a notable change in the behavior, lifestyle and engagement of many individuals. This include ; providing a faster and more convenient way of computing and completing tasks. Accelerating the global rate of technological development due to great computing capabilities. Educational enhancement and development through online education.

Computing also pose some societal issues which needs to addressed. This include :

Issues regarding privacy and identity theft are widespread. Addiction to games and other engaging content often pose distraction to youth and child development. Computing could be said to have placed increased pressure on human power and engagement with the advent of automated robots and programs. Increased exposure to electromagnetic rays. Promotion of indecency and immoral contents has become increasingly easier. Peer influence through fake promotion and display of wealth by some overrated individuals.

Therefore, it is imperative that informations conveyed through the internet are treated with utmost confidentiality in other to avoid privacy issues which may arise from leakage.

8 0
4 years ago
_____ should be used to create a project schedule.
dem82 [27]

Answer:

meeting is the correct answer

3 0
3 years ago
If your attack seems unsuccessful, one thing that you can investigate is whether the SYN cookie mechanism is turned on. SYN cook
kykrilka [37]

Answer:

suds systolic -a I believe

Explanation:

5 0
4 years ago
Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order). The memory allocation algorithm th
Makovka662 [10]

Answer:

The memory allocation algorithm that is used to place the processes given is the <u>First Fit Algorithm </u>

Explanation:

The First Fit Management Algorithm works by ensuring that the pointer keeps track of all the free spaces in the memory and accepts and executes all instructions to allocate a memory block to the coming process as long as it is big enough to hold the size of the process.

For example, the First Fit algorithm will allocate the processes in the first block that fits (that is, if it can fit the memory bock in the queue, then the process will be store)

It will work as follows (recall that the memory partitions are in order and must remain so):

A) 115 KB is stored in 300KB block, leaving the following free spaces (185KB, 600KB, 350KB, 200KB, 750KB, 125KB), next

B) 500 KB is store in a 600KB block leaving the following free spaces (185 KB, 100  KB, 350 KB, 200 KB, 750 KB, 125 KB), next  

C) 358 KB is stored in 750KB block, leaving the following free spaces (185KB, 100KB, 350KB, 200KB, 392KB, 125KB)  next

D) 200 KB is stored in 350KB block, leaving the following free spaces (185 KB, 100 KB, 150KB, 200KB, 392KB, 125KB)  next

E) 375KB is stored in 392KB block leaving (185KB, 100KB, 150KB,  200KB, 17KB, 125KB)

One of the demerits of this Algorithm is that, as shown above, memory is not maximized. It however is one of the easiest algorithms amongst all the other memory allocation processes.

Cheers

5 0
3 years ago
In an emergency supply kit there should be __________ per person per day for __________ and __________ A. 1 gallon of water / dr
drek231 [11]
The answer would be A.) a gallon or water for drinking and sanitation
5 0
4 years ago
Other questions:
  • A network technician has configured a point-to-point interface on a router. Once the fiber optic cables have been run, though, t
    12·1 answer
  • Given an integer variable bridgeplayers, write an statement that increases the value of that variable by 4.
    9·1 answer
  • List the applications in the CyberOps menu.
    15·1 answer
  • Problems of mobile phones
    8·1 answer
  • What is the multiple source test
    15·1 answer
  • Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the
    7·1 answer
  • A system analyst generally needs to have a number of skills. For example, technical and analytical skills are required for this
    7·1 answer
  • What are the two types of commennts of java​
    12·1 answer
  • 2.13.4 Colorful Caterpillarhel ????
    15·1 answer
  • Which window would show you bindings for local area connection 2?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!