Tuesday, September 29, 2015

Triangle/Test Homework Hints/Suggestions/Warnings

Hi all,

A few brief notes/hints/warnings on tonight’s homework (Triangle and TriangleTester.java)

1.)    Follow the directions VERY carefully on this one… especially in writing the Tester.  You want to make sure that your Tester follows all five separate steps as described in the directions.
2.)    Use the “CircleExample” zip file that I uploaded onto my DHS web page as a good blueprint to follow when building your Triangle class and the TriangleTester.  The tester, in particular, is written to look **very** similar to how you will want to build the Tester for the Triangle class.
3.)    Warning #1:  When you calculate the area of a Triangle object (as in, the area is half the product of the base and the height of a triangle), DO NOT use (1/2) to represent one-half.  Instead, use (1.0/2.0).  You might notice a pattern forming here between this and the Volume assignment
4.)    Warning #2: When you are writing the getArea() method, DO NOT add area as an instance variable.  You should ONLY have the two instance variables specifically described in the assignment (namely, the base and the height).  Use the getCircumference() method of the Circle class for an idea for the appropriate alternative.
5.)    There are opportunities for “Better” and “Best” versions of this, too, so if you feel up for the challenge, go for it!

Finally, I would love to see this be the entry point for students to begin using GroupMe when they get stuck.  Learning to collaborate with your classmates will likely speed up the amount of time it takes for you to complete this (and future) assignments, and fits with the modern industry standard of collaborative coding techniques.

Hope this helps.  Good luck tonight.


Mr Svetlik

No comments:

Post a Comment