import TerminalIO.KeyboardReader;

public class TempConversion
{
	public static void main(String [] TemperatureCalculations)
	{
		KeyboardReader reader = new KeyboardReader();
		double fehrenheit;
		double celsius;
		
		System.out.print("Enter degrees Fahrenheit:  ");
		fahrenheit = reader.readDouble();
		
		celsius = (fahrenheit - 32.0) * 5.0 / 9.0;
		
		System.out.print("The equivalent in Celsius is ");
		System.out.println(celsius);
		
		reader.pause();
	}
}

I picked up a copy of Fundamentals of Java by Lambert Osborne off of ebay not too long ago; it was reccomended to my by my AP Computer Science teacher because I had expressed interest in refining my Java knowlege (or rather, going over it all again as she was not the best at teaching it). I've started on it and have made it to this one program above. It tells me at compile time that it cannot find the TerminalIO package, and from what I know of Java, that means it is no longer supported in their JRE (though correct me if I'm wrong.) I don't know how to work around this, however. I've made sure it wasn't a spelling issue (the book goes though alot of the programs line for line) and I remember having a similar issue in AP class, but we where using an older JRE, and TerminalIO wasn't even a part of it I don't believe. If you could give me a hand and an explination as to the changes I need to make, I'd be grateful.

Regards,
M.

I have never heard of that package, and somehow I doubt that the book
spelled it that way, since package names are suppossed to be all lower
case. Also, it was never a part of the JRE, since all those packages start
with either java, javax, com, sun, or org.

Thats what I said at first, because all the ones I remember from class all ahve java in them. But none the less, the book says as the first line of code:

import TerminalIO.KeyboardReader;

That's certainly no standard package. It's probably developed (or described at least) somewhere else in the book in a section you skipped over.

I don't think I skipped over anything, its an early chapter, and the only pervious chapters where History of Computers.

Sorry for the double post; I can't find the edit button...but I moved on past that exercise and onto one called "Turtle Graphics", and it admits that TurtleGraphics is a nonstandard package, and it has me make an instance of it to draw basic graphical designs. I understand the workings and all, but seince I cannot compile, or even run this program because I don't have the appropriate package, how can I go about solving this problem?

Did the book come with a CD? Or does it have all these non-standard
packages maybe written uot in an appendix or something. Or can you
look at the references and find out if it says where they might be downloaded from.

I would, however, say that you probably made a bad purchase. I cannot
believe a book that calls itself "Fundamentals of Java", and then goes
about using a load of non-standard, and falsely coded, packages can be
all that good. Maybe it is, but I would at least be wary.

You have probably moved on to other things by now, but I just discovered your thread and a possible solution for you (and by the way I've found this book to be very helpful). Here's a link to Martin Osborne's home page (he is one of the authors of the book you bought).
http://faculty.cs.wwu.edu/martin/
Near the bottom you'll find a link to the software packages you need for the examples you were trying.

Good luck!

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.