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

  Write a method to save a linked list to a text file

Write a method to save a Linked List to a text file called file.txt. It must save the Linked List to the file with each node on a different line.

  What are the gui components in java

What are the GUI components in Java? Explain at least two of them

  Create your own date class

You are to write a program that determines the day of the week for New Year's Day in the year 3000. To do this, you must create your own date class (MyDate) and use the following interface and main program:

  Programming principles please help me doing my assignment i

please help me doing my assignment i have attached my assignment requirement document refer it and send me the solution

  What is the purpose of the enableevents method

What is the difference between the JDK 1.02 event model and the event-delegation model introduced with JDK 1.1? What is the purpose of the enableEvents() method?

  Implement a class called reversewords

Implement a class called ReverseWords that uses a stack to output a set of elements input by the user in reverse order.

  Prepare a simple windows calculator in java it must have a

create a simple windows calculator in java. it should have a labeled text field for the user to provide input as well

  Give the syntax of do while statement

Please complete the following short answer questions with code snippets as well as paragraphical responses. This assignment should not be an exercise in copy and paste, but an assessment of your comprehension and evaluation of the course materials..

  Digit decimal seconds counter using two 7-segment displays

Write a program that implements a two digit decimal seconds counter using two 7-segment displays.  Make this program using java programming. Make this program in simple way.

  Create dynamic web applications using javaserver pages

Analyze, design, develop, test, and deploy small-to-medium-scale Web applications and Create dynamic Web applications using JavaServer Pages (JSP) technology and Java Servlets

  Implement a singly linear linked list

Prepare a C++ using visual studios program to implement a singly linear Linked List - You need to implement singly link list in C++.

  Design a method in a stack implementation

Design a method in a Stack implementation that allows the user to insert a new member to the "bottom" of a stack.

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