Notes on Projetc 1, Phase 3 1) Test cases 2) UML A good set of test cases for Project 1 -------------------------------------- If these tests work, I am reasonably sure your game works. Please read these over carefully. I expect your own test cases will improve over this term. Note on testing: 3 tests of things that vary is a standard rule of thumb. It is a common math proof technique to do the base case (first test) and 2 more and be able to conclude the other tests work too. Therefore I'll test board sizes of 5,6,and 10. What's being tested Test data Expected Results ------------------------------------------------------------------ 1) display of board size 5 display has a 5x5 size prob .5 and board size stays 5x5 3 gens for each gen shown @ _ @ _ @ _ _ _ @ _ @ @ _ _ @ The contents @ @ _ _ @ of the board @ @ _ _ @ may change as gens @ _ @ _ _ go by it will _ _ @ _ @ use @ for alive @ _ @ _ @ and _ for dead _ _ _ @ _ the whole time. @ @ _ _ @ @ _ @ _ _ _ _ @ _ @ @ _ @ _ @ _ _ _ @ _ @ @ _ _ @ 2) board size size 5 display has a 5x5 size prob .5 @ _ @ _ _ 0 gens _ _ @ _ @ @ _ @ _ @ _ _ _ @ _ @ @ _ _ @ size 6 display has a 6x6 size prob .5 @ _ @ _ _ @ 0 gens _ _ @ _ @ _ @ _ @ _ @ _ _ _ _ @ _ _ @ @ _ _ @ _ _ _ _ @ _ _ size 10 display has a 10x10 size any prob @ _ @ _ _ @ _ _ @ _ any gens _ _ @ _ @ _ _ _ @ _ @ _ @ _ @ _ _ _ @ _ _ _ _ @ _ _ _ _ @ _ @ @ _ _ @ _ _ _ @ _ _ _ _ @ _ _ @ @ @ @ @ _ @ _ @ _ _ _ @ _ _ _ _ @ _ _ _ _ @ _ @ @ _ _ @ _ _ _ @ _ _ _ _ @ _ _ @ @ @ @ 3) initial prob prob 0 Completely dead board size 5 _ _ _ _ _ 0 gens _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ prob .5 Random 1/2 live, 1/2 dead board size 5 _ @ _ _ _ 0 gens _ @ _ _ @ you will not _ _ @ _ _ see this @ _ _ _ @ exact board _ _ _ @ _ filling prob 1 Completely live board size 5 @ @ @ @ @ 0 gens @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ 3) generation update size 5, prob .5, any gens alive cell, 2-3 neighbors Cell alive next alive cell, 0-1 neighbors Cell dead next Note: no board alive cell, 4-8 neighbors Cell dead next wrapping. The only available neighbors dead cell, 0-2 neighbors Cell dead next actually touch the cell. dead cell, 3 neighbors Cell alive next dead cell, 4-8 neighbors Cell dead next 4) end of game size 5, prob .5, 4 gens See 5 board displays Gen 0 and 4 more size 5, prob 0, 4 gens See 1 board. Stops after blank board size 5, prob 1, 10 gens See a few boards then stops on blank board. The second reason to stop the game was optional. ---------------------------------------------------------------------- ---------------------------------------------------------------------- UML Although Violet gives you the shell of a UML with member data and method names. It leaves out some important things. You must add the type of each member data. It would be even better to show public/private (+/-) BAD GOOD BETTER ---------------------------------------------- size int size - int size board Board board - Board board cells boolean[][] cells - boolean[][] cells You also need a return type, and parameter types for your methods. Even better is a note for public/private. BAD BETTER --------------------------------- isAlive - boolean isAlive() foo + void foo(int, String[]) If you have static or final things, you should look up the proper way to express that in UML.