I'm at wits end. First of all, I'm a beginner and am really struggling with this. I'm at the very end of my assignment and am supposed to append the output.
My code looks like this-
do {
strcost=JOptionPane.showInputDialog("Enter cost (>0) :");
cost=Integer.parseInt(strcost);
}while(cost<=0);//end of 1st do statement
do {
strresidual=JOptionPane.showInputDialog("Enter residual value(>0and<cost):");
residual=Integer.parseInt(strresidual);
}while(residual<=0||residual>cost);//end of 2nd do statement
do {
struseful_life=JOptionPane.showInputDialog("Enter useful life (>0): ");
useful_life=Integer.parseInt(strresidual);
}while(useful_life<0);//end of 3rd do statement
//Decimal Format
DecimalFormat precisionTwo = new DecimalFormat("0.00");
JTextArea outputTextArea= new JTextArea(7,55);
JTextArea txtArea = new JTextArea("JTextArea example ", 10,34);
outputTextArea.append("\t\t" + "Depreciation Schedule" );
for (int x=1;x<=useful_life;x++)
{
year_dep=dep_cost/useful_life;
accum_dep+=year_dep;
carry_val=cost-accum_dep;
JTextArea txtArea1 = new JTextArea("JTextArea example ", 10,34);
outputTextArea.append(x+"\t"+cost);
}
How can I get this to show? Thanks in advance.