Question: ITS A JAVA PROGRAMMING ASSIGNMENT. DO IT IN JAVA LANGUAGE Objective: IT'S A JAVA PROGRAMMING ASSIGNMENT To give you practice creating and working with classes

ITS A JAVA PROGRAMMING ASSIGNMENT. DO IT IN JAVA LANGUAGEITS A JAVA PROGRAMMING ASSIGNMENT. DO IT IN JAVA LANGUAGE Objective: IT'S

Objective: IT'S A JAVA PROGRAMMING ASSIGNMENT To give you practice creating and working with classes and derivation The Program: Dinosaurs have several basic characteristics: a species name, height and weight, movement speed, and diet. They also have several basic behaviors: eating, moving, and sleeping Your assignment is to define and implement a generic Dinosaur class that defines these characteristics and behaviors. The behaviors can be very basic, just printing out a line saying something like "sleeps." Declare all member fields as private, and make sure that you have accessor functions for all of the member fields. Use the Dinosaur class as a base class and make classes to represent the following: * - * Apatosaurus (a very large, herbivorous, slow-moving dinosaur) Tyrannosaurus Rex (a large, carnivorous, fast dinosaur) Hadrosaur (a medium-sized, herbivorous, fast dinosaur) For each of these classes, come up with at least two additional pieces of information about that specific dinosaur type (eg, for a Tyrannosaurus, you might have the number of teeth the particular Tyrannosaur has). Also, customize at least one of the sleeping/eating/moving behaviors for each class as appropriate. You can make up any details you want if you don't want to bother looking up information about dinosaurs Once you have these classes, write a small driver program that: Creates one of each kind of dinosaur object Have each one go through its behaviors

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!