Create a class Ghost
Ghost objects are instantiated without any arguments.
Ghost objects are given a random color attribute of white" or "yellow" or "purple" or "red" when instantiated
ghost = new Ghost();
ghost.color //=> "white" or "yellow" or "purple" or "red"
ghost = new Ghost()
ghost.color #=> "white" or "yellow" or "purple" or "red"
ghost = Ghost.new
ghost.color #=> "white" or "yellow" or "purple" or "red"
ghost = Ghost()
ghost.color #=> "white" or "yellow" or "purple" or "red"
Ghost ghost = new Ghost();
ghost.getColor(); //=> "white" or "yellow" or "purple" or "red"
Ghost ghost = new Gost();
ghost.GetColor(); // => "white" or "yellow" or "purple" or "red"
- Created: 2014-08-17
- Published: 2014-08-17
- Approved: 2014-08-27
- Completed: 2015-05-09