Hi I'm trying to access the toolkit for an assignment I'm writing and I keep getting the same compiler message. What am I doing wrong?
import java.text.DecimalFormat;
import java.io.*;
import java.util.Scanner;
public class Robert_Gardner_6_07
{
public static void main(String[] args) throws IOException
{
// Delcare them variables
// File names
final String INPUT_FILE_NAME = "RobertGardner_6_07_Input.txt";
final String OUTPUT_FILE_NAME = "RobertGardner_6_07__Output.txt";
// Append current file boolean variable
final boolean APPEND_INDICATOR = false; // Create a new file
int numberOfNumbers = 0; // Number of numbers in input file
double reImb = 0; // Used for reimbursement amount
double oneNumber; // A single number read from the file
double sum = 0; // Sum of milage calculated
double sumReimb = 0; // Sum of reimbursement
String processPhrase; // Indicates appending or creating a file
// Access the Toolkit using the variable 'tools'
Toolkit_General tools = new Toolkit_General();
// Access the input and output files
File inputDataFile = new File(INPUT_FILE_NAME); // Access input
Scanner inputScanner = new Scanner(inputDataFile);
FileWriter outputDataFile = new FileWriter(OUTPUT_FILE_NAME ,APPEND_INDICATOR);
PrintWriter outputFile = new PrintWriter(outputDataFile);
// Format numeric output
DecimalFormat formatter = new DecimalFormat("#,##0.0");
if (APPEND_INDICATOR)
processPhrase = "Appending";
else
processPhrase = "Creating";
// Display file information on console
System.out.println("Reading file " + INPUT_FILE_NAME + "\n" +
processPhrase + " file " + OUTPUT_FILE_NAME);
// Display heading in output file
if (inputScanner.hasNext()) {
printHeading();
outputFile.println("Miles and Reimbursement");
outputFile.println("-----------------------");
}
// Read the input file and sum the numbers.
while (inputScanner.hasNext())
{
inputScanner.nextLine();
oneNumber = inputScanner.nextDouble();
numberOfNumbers++;
sum += oneNumber;
// Print number to output file
outputFile.println(oneNumber);
if (oneNumber < 400) {
reImb = (oneNumber * .018);
sumReimb += reImb; // Add reimbursement amount to total
} else if (oneNumber >= 400 && oneNumber < 900) {
reImb = 65.00 + (0.15 * (oneNumber - 400));
sumReimb += reImb; // Add reimbursement amount to total
} else if (oneNumber >= 900 && oneNumber < 1300) {
reImb = 115.00 + (0.12 * (oneNumber - 800));
sumReimb += reImb; // Add reimbursement amount to total
} else if (oneNumber >= 1300 && oneNumber < 1900) {
reImb = 140.00 + (0.10 * (oneNumber - 1200));
sumReimb += reImb; // Add reimbursement amount to total
} else if (oneNumber >= 1900 && oneNumber < 2600) {
reImb = 165.00 + (0.08 * (oneNumber - 1800));
sumReimb += reImb; // Add reimbursement amount to total
} else if (oneNumber >= 2600) {
reImb = 195.00 + (0.06 * (oneNumber - 2500));
sumReimb += reImb; // Add reimbursement amount to total
} // End if
if (oneNumber <= 0) {
outputFile.println("" + tools.padItString("*****",10," "," "));
} else {
outputFile.println(" " + tools.leftPad(reImb,10,"#,##0.00"," "));
} // End second if checking milage <= 0
} // End while
// Print the calculations to the output file
String summary = "\nNumber of values: " + tools.leftPad((numberOfNumbers),
10,"#,##0.00"," ") + "\nMiles Calculated: " +
tools.leftPad(sum,10,"#,##0.00"," ") + "\nReimbursement: "
+ tools.leftPad(sumReimb,13,"#,##0.00"," ") + "\nValues >= Zero: "
+ tools.leftPad((9),12,"#,##0.00"," ") ;
outputFile.println(summary);
// Close files
outputFile.close();
inputScanner.close();
} // End Main
// Method to print heading
public static void printHeading()
{
System.out.println("Mileage Reimbursement Table");
}
} // End Class
compiler keeps saying:
----jGRASP exec: javac -g Robert_Gardner_6_07.java
Robert_Gardner_6_07.java:37: cannot find symbol
symbol : class Toolkit_General
location: class Robert_Gardner_6_07
Toolkit_General tools = new Toolkit_General();
^
Robert_Gardner_6_07.java:37: cannot find symbol
symbol : class Toolkit_General
location: class Robert_Gardner_6_07
Toolkit_General tools = new Toolkit_General();
^
2 errors