This class was left a bit of a mess from a previous developer. Make these fixes.
The two new fields should be color and length, not color and shape.
The constructor needs three fields: width/pointSize, color, length. (It wouldn't take a parameter for bodyMaterial, since it's "chalk"!). In addition to "chalk", width should be passed to the super constructor as well. The constructor should then assign the remaining fields.
The new fields need accessors. And length needs a mutator. (Boring would be a set method. Exciting would be a method that shrinks the length of the chalk every time it writes.
This class was left a bit of a mess from a previous developer. Make these fixes.
The two new fields should be color and length, not color and shape.
The constructor needs three fields: width/pointSize, color, length. (It wouldn't take a parameter for bodyMaterial, since it's "chalk"!). In addition to "chalk", width should be passed to the super constructor as well. The constructor should then assign the remaining fields.
The new fields need accessors. And length needs a mutator. (Boring would be a set method. Exciting would be a method that shrinks the length of the chalk every time it writes.