Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I NEED HELP (JAVA CODE AND GUI CODE) es ar 1. Write the definition for all classes and the interfaces. [Hint: Cat, Bear and Elephant
I NEED HELP (JAVA CODE AND GUI CODE)
es ar 1. Write the definition for all classes and the interfaces. [Hint: Cat, Bear and Elephant classes need to implement all the abstract methods.] 2. Create the AnimalGUl.java and design similar GUI. Animal Family a) Button "Save": to add selected animal object to an array type Animal. b) Button "Clear All": to clear all text fields and text area. c) Button "Display": to display details of all objects in the array. d) Button "Exit": to stop the program. 3. Your program must use a for loop to display the output. Invoke the correct methods to get the similar output as given below. [Hint: MUST use instanceof and casting] OUTPUT Name : Pussy Number of Legs: 4 Sound : Meow. Moow. Meow. Color White Pussy is a Camivore and Meat Eaterscanimal Sourcas. Cat likes to eat birds mice, fsh etc Pussy likes to play with string. Name :Grively Number of Legs: 4 Sound : Growl. Growl. Grow Color Black Bear is an Omnivere. Omrivore is similar to both Herthore and Carnivere. Bear eats both Plants and also Meat Eatersilinimal Sources. Bear likes to eat bemies, roots, fungi, grasses, fish, carrion, amall mammals, and insects. OUTPUT Pussy is a Camivore and Heat Eatersitinimal Sources. Cat likes to eat birds, mice, fish etc. 4. You program also need to handle TWO (2) cases: a) List is full (when user to try add new object into a full array). Animal family b) List is empty (when user choose to display an empty array)Step 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