Problem

Visit www.myprogramminglab.com to complete select exercises online and get instant feedbac...

Visit www.myprogramminglab.com to complete select exercises online and get instant feedback.

Exercise

The following program will compile and run, but it uses poor programming style. Modify the program so that it uses the spelling conventions, constant naming conventions, and formatting style recommended in this book.

public class messy {public static void main(String[] args){double TIME; double PACE;System.out.println("This program calculates your pace given a time and distance traveled.");TIME = 35.5; /* 35 minutes and 30 seconds */PACE = TIME / distance;System.out.println("Your pace is " + PACE + " miles per hour.");}public static final double distance = 6.21;}

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 1