Practice creating, documenting, and testing classes based on a given public interface. More graphics and math practice.
Your programming work for this assignment must be done in the ImplementingClasses project inside Eclipse. Use the SVN Repository Exploring perspective to check out this project, then switch back to the Java perspective.
Face class that we began together:
FacesComponent to pass an angle in each constructor call.
drawOn() method so the eyes and mouth are drawn correctly based on the stored angle. See the examples below for faces drawn at various angles.
Face:
public void setAngle(double angle)
public double getAngle()
public void rotate(double degrees)
FaceTests.
FacesComponent so it draws faces rotated 30° each as in the figure below.
Complete Exercise P3.5 from Big Java. Use JUnit to implement the required CarTester class.
This exercise doesn’t involve graphics. You’ll just implement and test a Car class that models fuel economy. The objective is to practice with the “How To: Implement a Class” steps from session 5.
Turn in your programming work by committing it to your SVN repository.