View Single Post
 10-25-2012, 05:09 PM PM User | #1 Basic Chaos New to the CF scene   Join Date: Oct 2012 Posts: 3 Thanks: 2 Thanked 0 Times in 0 Posts How can I move a user's input into a table and manipulate it with previous methods? Code: ``` //This is the code I have so far.// import java.util.Scanner; public class AnnualPayCalculator { public static void main(String[ ] args) { double salesAmount ; Scanner keyboard = new Scanner(System.in); System.out.print(" Enter the total dollar amount of sales for this year."); salesAmount=keyboard.nextDouble( ); if ( salesAmount >= 320000 ) { System.out.println( " Your total compensation for this year is " + ( 0.0925 * salesAmount + 30000 )); } if ( salesAmount < 320000 ) { System.out.println( " Your total compensation for this year is " + ( 0.08 * salesAmount + 30000 )); } }``` //The above code compiled correctly and is working. This is where I get lost. I need a table with two columns to be created. It must be populated with the user's input for the sales amount in the first column. The program must also add the commission earned for that amount with the annual salary and place it in the second column.// //I also need the table to be populated with figures created by increasing the sales amount in increments of 5000 until the amount is greater than or equal to 1.5 * times the user sales amount (In the first column). The program must also add the commission total with the annual salary for each amount and display it in the second column.// //Does anyone have any suggestions about how the user input can be manipulated and moved into a table?// Last edited by Basic Chaos; 10-26-2012 at 04:43 PM..