Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The level of difficulty of these problems varies wildly. Some are entirely appropriate for a high school course. Others definitely inappropriate. Although problems are categorized

The level of difficulty of these problems varies wildly. Some are entirely appropriate for a high school course. Others definitely inappropriate. Although problems are categorized by topics, this should not be taken very seriously. Many problems fit equally well in several different topics.

Please answer all of the questions perfectly (no short answer please). I will thumbs up/rate if it's correct. Please it's urgent.

In java,

image text in transcribed

Design an interface named Swimmer with a void method named howToSwim (). Every class of a swimmer object must implement the Swimmer interface. Design a class named Fish. Write an equals method for the Fish class; have it override the Object equals method. Two Fish are equal if they have the same values of the instance variables vertabrates (a Boolean) and edible (a String). Design a class named Goldfish that extends Fish and implements Swimmer. Implement howToSwim to display the message It is swimming. Then design a class named BubbleEye that extends Fish and implements Swimmer. Implement howToSwim to display the message "It is swimming". Draw a UML diagram that involves Swimmer, Goldfish, BubbleEye and Fish. Write a test program that creates an array of five Fish objects. For each object in the array, display the result of equals method with another object of the same array and invoke its howToSwim method if it is swimmer

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

Students also viewed these Databases questions

Question

=+ (e) The probability in Problem 2.15.

Answered: 1 week ago