Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please do it in java language!! Objective: To give you practice creating and working with classes and derivation. The Program: Dinosaurs have several basic characteristics:

please do it in java language!!image text in transcribed

Objective: 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 sleepingleating/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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago