Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this in JAVA please! There are three types of animals: Dog, Cat, and Bird. And they contain three common instance variables (think what

image text in transcribed

I need this in JAVA please!

There are three types of animals: Dog, Cat, and Bird. And they contain three common instance variables (think what kind of data types should be used to declare them): 5. a. name b. age c. weight And some common method (To implement each method, just print out the function name, like the function of eat) is printing "eat" on your screen. All methods should use this rule no matter it is common or particular to an animal) d. eat() e. talk) f. sleep() Beside these common variables and methods, please notice that Dog has a method called bark(), Cat has a method called meow), and Bird has a method called chirp). What you need to do is: Define all animals. Then in your main) method, print out all functions each animal can 0 Hint: don't forget to use superclass to save your time. There are three types of animals: Dog, Cat, and Bird. And they contain three common instance variables (think what kind of data types should be used to declare them): 5. a. name b. age c. weight And some common method (To implement each method, just print out the function name, like the function of eat) is printing "eat" on your screen. All methods should use this rule no matter it is common or particular to an animal) d. eat() e. talk) f. sleep() Beside these common variables and methods, please notice that Dog has a method called bark(), Cat has a method called meow), and Bird has a method called chirp). What you need to do is: Define all animals. Then in your main) method, print out all functions each animal can 0 Hint: don't forget to use superclass to save your time

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

=+16.10. 2.19 16.9 | Assume u(1) Answered: 1 week ago

Answered: 1 week ago