Add a mutator for each field in the Beetle class. Use assertions (see Appendix A) to ensure that these mutators cannot be used to put the Beetle into an inconsistent state, such as having legs but no body.
Change the type of the top Face field in the Die class from int to double. What other modifications do you have to make to the Die class to get it to compile? The Beetle Game class should run without any modifications when you are finished.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here