954,184 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Package TerminalIO does not exsist.

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.

MEversbergII
Newbie Poster
5 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

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.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

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;

MEversbergII
Newbie Poster
5 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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

MEversbergII
Newbie Poster
5 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

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?

MEversbergII
Newbie Poster
5 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

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.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

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.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

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!

AlwaysLearning
Newbie Poster
1 post since Oct 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You