[CSC 204] Re: CSC 204
Andrew J. Pounds
pounds_aj at mercer.edu
Thu Jan 29 23:55:02 EST 2009
> After loading your Drink.java program into a new project it refuses to
> run on my eclipse. I says that it doesnt contain a main type. I do
> not remember you making any modifications in class to drink.java
> before running it. Is there a problem with my eclipse or am I just
> missing something. Thanks
> Thomas Evans
>
>
This is EXACTLY what should happen.
Drink.java is the SOURCE code that I wrote to make the Drink.class
file. This is the file that defines the Drink object. Like we saw in
lab today, you have to have another test program create and manipulate
the object. Also as we saw in lab today, the file that defines the
object (like BoxBug.java, CircleBug.java, and SpiralBug.java) does not
contain a "main" method -- and therefore will not run on its own.
Another program has to be present to actually utilize the code (In lab
today it was the BoxBugRunner.java file).
When I demonstrated the Drink.class file in class on Monday, I had
another piece of code named "Machine.java" that I wrote to create and
manipulate the Drink.java file.
>From a teaching perspective we are dealing with levels of abstraction.
Remember -- on Monday I started with just the Drink.class file -- you
were not given the Drink.java code -- that's why we had to go look at
the API. At the end of class on Monday I showed you the source code
that I used to make the Drink class (Drink.java). This was the point
that we passed from Chapter 2 to Chapter 3. In class on Wednesday we
played exclusively with Drink.java, developed a new level of
abstraction, and used Drink.java to come up with an Airplane model. We
will finish that process tomorrow in class.
--
Andrew J. Pounds, Ph.D. (pounds at theochem.mercer.edu)
Associate Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://theochem.mercer.edu/pipermail/csc204/attachments/20090129/104dd6e6/attachment.html
More information about the csc204
mailing list