Create an abstract class called aqualife.

Assignment Help JAVA Programming
Reference no: EM13940651

Create an abstract class called Aqualife.
Aqualife has the following attributes:
name
age
lakeFish
oceanFish

Aqualife defines 2 abstract methods called eats() and procreates().
A third concrete method called breathes() displays that 'These creatures breathe from gills.'
Create subclasses of Aqualife:
Fish
Whale

Fish has an attribute which stores whether the fish is an herbivore or a carnivore. Its eats method checks whether herbivore or carnivore, and prints 'This fish eats veggies' for herbivores and 'This fish eats other fish' for carnivores. Its procreates method prints 'Fish lay eggs'.
Whale has an attribute that specifies whether the whale is a blue whale or a killer whale. If the whale is a blue whale, it eats veggies, if it is a killer whale it eats meat. Its procreates method prints that whales are mammals. It overrides the breathes method from the parent class. This method must print 'These mammals breathe above water'.

Reference no: EM13940651

Questions Cloud

Discuss the positive and negative factors : Drawing on the literature, critically discuss the positive and negative factors that may directly or indirectly influence services workers' job performance.
Determine the number of complete revolutions : A mixing drum is accelerated from 50 to 160 rpm in a time of 20 s by a driving torque of 25 Nm. Determine (a) the angular acceleration, (b) the number of complete revolutions turned, (c) the work done, (d) the average power developed, (e) the maxi..
Establishment core business activities : Outline your establishment's core business activities . If you're not currently employed, list the core business activities most relevant  to the product  or service you've chosen to promote from your training environment.
Whether toni hoffman act of whistleblowing morally justified : Using Bowie's theory assess whether Toni Hoffman's act of Whistleblowing was morally justified? 2. Will the most recent whistle-blower legislation for public officials (Public Interest Disclosure Act 2013) be sufficient in protecting whistleblower..
Create an abstract class called aqualife. : Fish has an attribute which stores whether the fish is an herbivore or a carnivore. Its eats method checks whether herbivore or carnivore, and prints 'This fish eats veggies' for herbivores and 'This fish eats other fish' for carnivores. Its procr..
Which system do you think better protects the defendant : Should the same system be used for both criminal and civil cases, or would it be better to have one system for criminal matters and the other system for civil matters? Why or why not?
Transforming the work environment of nurses : In no more than 2000 words, write an assignment on: "The USA Agency for Healthcare Research and Quality (2004) produced a document, Keeping patients safe: Transforming the Work Environment of Nurses (2004).
What does transparency mean in accounting : What does "transparency" mean in accounting? What is the term used to describe the possibility that a foreign currency will decrease in US $ value over the life of an asset such as Accounts Receivable
Provide a comprehensive idea and scope of the project : Your task is to complete the project management document to provide a comprehensive idea and scope of the project. Your submission should include the following documents:

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd