Question
Q1: Imagine that you want to keep track of your pet fish. Each fish is a certain kind and has a two-part name. For example,
Q1: Imagine that you want to keep track of your pet fish. Each fish is a certain kind and has a two-part name. For example, your clownfish is named Nemo Finding. You want to see whether any two given fish are the same kind. You also want to know how many fish you have. Design, implement, and demonstrate a class Fish that meets the previous requirements. Include UML diagram that gives only the class names and the associations between them. Document each method with comments in javadoc format. Implement a class called Name to represent a fishs pet name. Some of your methods and constructors must have object parameter of type class. SAMPLE OUTPUT: Test toString(): Nemo Finding (clownfish) Test getName(), getType(), and getNumberOfFish(): My name is Nemo Finding; I am a clownfish fish. There are 3 fish in the tank. Test isSameType(): Nemo Finding (clownfish) and Bozo Iron (clownfish) are the same type of fish. Nemo Finding (clownfish) and Patrick Star (starfish) are different types of fish. Press any key to continue . . .
//please finish this in java
Q1: Imagine that you want to keep track of your pet fish. Each fish is a certain kind and has a two-part name. For example, your clownfish is named Nemo Finding. You want to see whether any two given fish are the same kind. You also want to know how many fish you have. Design, implement, and demonstrate a class Fish that meets the previous requirements. Include UML diagram that gives only the class names and the associations between them. Document each method with comments in javadoc format. Implement a class called Name to represent a fish's pet name. Some of your methods and constructors must have object parameter of type class. SAMPLE OUTPUT: Test toString () : Nemo Finding (clownfish) Test getName(), getType(), and getNumberOfFish(): My name is Nemo Finding; I am a clownfish fish. There are 3 fish in the tank. Test isSameType () : Nemo Finding (clownfish) and Bozo Iron (clownfish) are the same type of fish. Nemo Finding (clownfish) and Patrick Star (starfish) are different types of fish. Press any key to continueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started