1
Contributor
2
Replies
3
Views
5 Years
Discussion Span
Last Post by JavaPrograms
0

Not sure of how to format it but the code is shown below

Edited by JavaPrograms

0
public class Project {
  public static void main (String [] args){

    double dTime, cTime, deTime, tTime;

    System.out.println("Enter the number of minutes spent on each of the following project tasks: ");
    Scanner input = new Scanner(System.in);
    System.out.println("Designing: ");
    int designing = input.nextInt ();
    System.out.println("Coding: ");
    int coding = input.nextInt ();
    System.out.println("Debugging: ");
    int debugging = input.nextInt ();
    System.out.println("Testing: ");
    int testing = input.nextInt ();

    totalTime = dTime + cTime + deTime + tTime;

    dTime = totalTime/designing;
    cTime = totalTime%designing/coding;
    deTime = totalTime%designing%coding/debugging;
    tTime =  totalTime%designing%coding%debugging/testing;

    System.out.format("%-10s %8s %8s",  "Task", "% Time\n");
    System.out.format("%-10s %8s %8s",  "Designing", + dTime "\n");
    System.out.format("%-10s %8s %8s",  "Coding", + cTime "\n");
    System.out.format("%-10s %8s %8s",  "Debugging", + deTime "\n");
    System.out.format("%-10s %8s %8s",  "Testing", + tTime "\n");

      }

    }
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.