Question: Variables: The Dinosaur class must have these variables: name the name of the dinosaur. This should be a String. It should be visible to subclasses
Variables:
The Dinosaur class must have these variables:
name the name of the dinosaur. This should be a String. It should be visible to subclasses of
Dinosaur. An invalid value should default to Dino The value is invalid if name is an empty
String, blank String, or null. This value cannot be changed once set and should be visible to any
descendant classes. Think about what modifiers fit best for this!
height a double representing the height of the dinosaur in feet.
width a double representing the width of the dinosaur in feet.
weighta double representing the weight in pounds.
totalEnclosures an int representing the total number of dinosaurs that have an
enclosure at the park. Think about what reserved word you need to use for this variable. It
should be visible to subclasses of Dinosaur.
Constructors:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
