noob question
Getting error as following..
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
TextReader cannot be resolved to a type
TextReader cannot be resolved to a type
at TestCourseGrade.main(TestCourseGrade.java:15)
I am learning java out of a mercer book. he has some pre written code i copied to the working folder. code was named TextReader.java.
I am using eclispe to code and compile in. the code i am writing is a simple prog, which follows.
import TextReader;
public class TestCourseGrade
{
public static void main (String[] args)
{
double test1 = 0.0;
double test2 = 0.0;
double finalExam = 0.0;
double courseGrade = 0.0;
System.out.println("This program computes a course grade whe");
System.out.println("you have entered three requested values");
System.out.println();
TextReader keyboard = new TextReader();
System.out.print("Enter first test:");
test1 = keyboard.readDouble();
System.out.print("Enter second test:");
test2 = keyboard.readDouble();
System.out.print("Enter final test:");
finalExam = keyboard.readDouble();
courseGrade = (0.25 * test1)
+ (0.25 * test2)
+ (0.50 * finalExam);
System.out.println("Course Grade: " + courseGrade + "%");
}
}
Its probably something really simple, some how recogizing that the class (class, the other code written that it is calling) its is calling is there.
Im green, probably shows.
|