Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA , THANKS ! Assume that the following classes have been created. Do not write any import statements. A class named Bird and a sub-class

JAVA , THANKS !image text in transcribed

Assume that the following classes have been created. Do not write any import statements. A class named Bird and a sub-class named FlightlessBird. The Bird class has a String attribute called name, and another String attribute called countryOfOrigin. These are all set by the constructor in that order. The FlightlessBird class inherits all the attributes from the Bird class. It also has a boolean attribute called endangered. These are all set by the constructor by making use of a call to the super class constructor of the Bird class. The constructor of the FlightlessBird class is responsible for setting its own class variable endangered. This has all been done for you. You do not need to create the classes listed above. What you need to do: 1.) Declare and instantiate and array named birds that is capable of holding both types of objects: Bird and FlightlessBird 2.) The array should be able to hold a maximum of 2 obiects. 3.) Declare and instantiate an Bird object named griffon with the following parameters Name = "Griffon" Country of Origin = "Israel" 4.) Declare and instantiate a FlightlessBird object named ostrich with the following parameters Manufacterer = "Ostrich" Model Number = "Israel" Endangered = true 5.) Assign the griffon to the first position in the array. 6.) Assign the ostrich to the second position in the array

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

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions

Question

Women rarely use violence against their male partners. TRUE FALSE

Answered: 1 week ago

Question

Assess alternative dispute resolution methods.

Answered: 1 week ago

Question

What is operatiing system?

Answered: 1 week ago

Question

Know how productivity improvements impact quality and value.

Answered: 1 week ago

Question

Recommend the key methods to improve service productivity.

Answered: 1 week ago