Make an abstract class called aqualife

Assignment Help Computer Engineering
Reference no: EM1329482

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: EM1329482

Questions Cloud

Access the customerm.java file : design the class file that is needed to be run with this code, that is, write the class file that is implied by the main method. Post this code to your MS Word solution document for this assignment.
Describe the relationship between business and society : Describe the relationship between business and society
Systems theory and the triple bottom line theory : In what ways do Systems Theory and the Triple Bottom Line Theory support or negate each other?
Elucidate the historical relationship between unemployment : Elucidate the historical relationship between unemployment and inflation.
Make an abstract class called aqualife : Fish has an attribute that 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.
Computing quarterly installment of car loan : You need to borrow $65,000 for a new car. The annual interest rate is 12%, compounded quarterly. What is your quarterly payment? How much will you owe on the loan after you make the first payment?
Does a concept paper set the stage : How does a concept paper set the stage for the research proposal?
Situational determinants in fiedler''s leadership theory : Discuss the three situational determinants in Fiedler's leadership theory that allow a leader to determine the favorableness or unfavorableness of a situation for leading.
Federal income tax : Why did the U.S. Supreme Court once rule that the federal income tax was unconstitutional?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the importance of having a test coupled

Many will argue that it is considered a good practice to acknowledge the limitation of your research/project. Could you defend this argument.

  How to maintain the list of cd/dvds

How to maintain the list of CD/DVDs.

  What stack elements remain

suppose a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack.

  Identify the security provisions

Identify the security provisions

  D flip-flops

Using three D flip-flops,a multiplexer,decoders and gates, construct a 3-bit Gray code counter that has two inputs: reset, which sets the counter to 000, and inc, which makes the counter go to the next value in the sequence.

  Discuss the tester and developer relationship

Discuss the tester and developer relationship within spiral development methodology. You may use your personal experiences to support the arguments.

  Hardware tools need to search cell phone

After looking upon the warrant this search and seizure is justified thus, your team now should search the cell phone for the digital evidence. Explain the hardware tools required to search this cell phone?

  Create a class titled schooltextbook in java

Write the application with an array that holds 5 instances of the SchoolTextBook class, filled without prompting the user for input. Next prompt the used to enter a field for sorting, sort array of objects based on the user input.

  What restrictions must be imposed

Free Speech Online Some feel that there is too much objectionable material allowed on the Internet, whereas others argue that the Internet must be completely censored.what restrictions must be imposed.

  Researching intrusion detection systems

Utilize the Internet in order to research the intrusion detection systems. Explain the network which could benefit from your solution.

  How each diagram relates to the solution

Your submission should include 6 to 8 pages of Visio developed UML diagrams (minimum of six different ones), hierarchy chart, and flowcharts; copy/paste into a MS Word document that also contains the pseudo code and data dictionary for the solutio..

  Program that creates basic user interface code

Program that creates basic user interface code

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