Question: Java code please with @param A) (25 points] Create a class named PieceScooby that implements the following: Note: All properties should be private, all methods

 Java code please with @param A) (25 points] Create a class

Java code please

with @param

A) (25 points] Create a class named PieceScooby that implements the following: Note: All properties should be private, all methods should be public unless stated otherwise. Five fields (attributes/properties) Be sure to put in the appropriate access modifier. (private, public): o symbol for the string representation of the piece (string) O numScoobySnacks to represent number of snacks Scooby currently has o hidden to represent whether the piece is currently hidden or displayed on the board o canMove to represent whether the piece can move o original to represent whether the piece is the original piece from the start of the game A constructor with 5 parameters - that creates a PieceScooby with the attribute values passed to this constructor (in the order listed above) A no parameter constructor (must call the 5 parameter constructor) that creates a default PieceScooby. o symbol property should be set to S o numScoobySnacks should be set to O o hidden should be set to false o canMove should be set to true o original should be set to true Five public accessor methods: o getSymbol - for symbol property o getNumScoobySnacks for numScoobySnacks property o is Hidden - for hidden property o isEntangled for canMove property - the piece is entangled' if it can't move o canSpawn to represent whether the piece can make a copy of itself - only original pieces can make copies Three public mutator methods: o set Symbol - for symbol property o setHidden - for hidden property o entangle - no parameters - set canMove property to false A public mutator method named speak() that has no parameters and no returns. It displays the message "Scooby-Dooby-Doo!" A private mutator method named eatScoobySnack that has no parameters and implements the following: o if the number of Scooby Snacks is greater than 0, then the number decreases by one and the canMove property is set to true A public mutator method named collectScoobySnacks that has one parameter representing the number Scooby Snacks being collected: o if the value is NOT negative - the number of Scooby Snacks is increased by the value passed and eatScoobySnack method is called

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!