How do I put the following output in a table format as shown below in the code?

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

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");

      }

    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.