<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="serif">I got two text messages from people in the last
hour asking about how to get started with the Programming
Assignment 2. If you have not started, and seem lost, here is
what I recommend.<br>
<br>
</font>
<ol>
<li><font face="serif">Get into Eclipse, create a new project
called Programming Assignment 2</font></li>
<li><font face="serif">In that project create a new java class
called ShippingCube.java. Make sure that when you create the
class that you DO NOT select the option to create a public
static void main() stub.</font></li>
<li><font face="serif">Create ANOTHER class in the same project
called Tester.java. When you create this one you DO NEED TO
select the option to create a public static void main() stub.</font></li>
<li><font face="serif">You should now have a ShippingCube CLASS to
build and a Tester CLASS with a main to test the ShippingCube
object you are going to create.</font></li>
<li><font face="serif">Go into your ShippingCube java file and
create an INSTANCE variable to hold the number of balls.</font></li>
<li><font face="serif">In your ShippingCube java file create a
ZERO ARGUMENT constructor that initializes the instance
variable to hold the number of balls to zero.</font></li>
<li><font face="serif">In your ShippingCube java file create a
method that returns the number of balls (I forget what I
called this method in the programming assignment, but you can
look that up). For the sake of argument we will call it
getBallNumber(). Make sure it is an "int" returning method
and that you have a "return" statement at the bottom of the
method.</font></li>
<li><font face="serif">Now get in your Tester program and call the
constructor you just created -- </font><tt>ShippingCube
cube1 = new ShippingCube().</tt></li>
<li>Then, in your Tester program, print out the number of balls in
your Shipping Cube -- <tt>System.out.println(cube1.getBallNumber())</tt></li>
<li>Compile and run, if you get zero back you should have a
working connection between your ShippingCube and your tester and
you can now start working on completing the class and testing it
to meet the project requirements.<font face="Helvetica, Arial,
sans-serif"> </font><tt> </tt><br>
</li>
</ol>
<br>
There are a lot of details to think about in this assignment --
please don't put it off.<br>
<pre class="moz-signature" cols="72">
--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</body>
</html>