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]
4 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]4 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
When Kristy recently started a photography business, she downloaded Photoshop to her computer to edit her photos. She notices he
Alika [10]

Answer:

Computer Properties

Explanation:

When the computer is turned on. Go to Windows Explorer (or CTRL+E).

Right click on "My Computer" or "My PC" (depending on the version of Windows you have installed).

From the list, select "Properties", which is usually the last on the list; you will see the size of the RAM installed on your PC.

Good luck

5 0
3 years ago
Which of the following is true about speculative risks? a. The risk/return tradeoff is applicable to speculative risks. b. Specu
My name is Ann [436]

Answer:

A) The risk/return Tradeoff is applicable to speculative risks.

Explanation:

Speculative risk always has a positive payoff and also a negative payoff , so option (b) is incorrect.

Speculative risk is a source of great concern for risk managers, so option (c)is incorrect.

Speculative risk is a category of risk that can be taken on voluntarily and will either result in a profit or loss , so option d is wrong

Pure risk, also called absolute risk, is a category of threat that is beyond human control and has only one possible outcome if it occurs: loss. Pure risk includes such incidents as natural disasters, fire or untimely death. so option (e) also incorrect

7 0
3 years ago
What is the HIPAA privacy rule, and why does it affect IT professionals.
user100 [1]
It protects a persons identifiable health information and medical records.
4 0
2 years ago
what is the term used to describe the situation when a derieved class provides a function already provided in the bae class
sleet_krkn [62]

Answer:

The right approach is "Overriding".

Explanation:

  • The overriding function seems to be a programming application that enables a classroom as well as children to successfully implement some technique that's been given by another one of their parents or super classes.
  • The overriding method must be named, signed, and parameter-like inside your parent process throughout the child one.

Thus the above is the correct answer.

6 0
3 years ago
Which one of the following is not possible to view in the debug logs?
Usimov [2.4K]

Answer:

Formula field calculations

Explanation:

We can use debug logs to track events in our company, these events are generated if active users have trace indicators.

A debug log can register information about database operations, system processes and errors, in addition, we can see Resources used by Apex, Workflow Rules, Assignment Rule, HTTP calls, and Apex errors, validation rules. The only one we cannot see is Formula field calculations.

8 0
4 years ago
Other questions:
  • Go to the Creamy Ice Corporation passage on the next page. Insert the trademark sign after the word “Corporation'' in the first
    9·1 answer
  • The mouse and keyboard are also sometimes called
    5·1 answer
  • What devices are used to connect computers to a network?
    10·1 answer
  • How to learn how to use computers
    9·1 answer
  • Prove each statement using a proof by exhaustion. For every integer n such that 0 lessthanorequalto n < 3, (n + 1)^2 > n^3
    9·1 answer
  • Which of the following represents the biggest difference between asymmetric and symmetric cryptography?
    9·1 answer
  • Kelly has always used "P4ssw0rd” as her password on her online accounts. Why should she change this? Check all that apply.
    8·2 answers
  • Who is the first computer programmer​
    14·2 answers
  • Language is PYTHON
    6·1 answer
  • What is the new subnet mask in prefix format?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!