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 two types of health care information systems

Analyze the impact of the effect on organizational decision-making.Make recommendations for implementation and improvements.

  Program to determine weighted average of test

Write an algorithm for a program which prompts the user to enter the five test scores, determine total of the five tests and determine the weighted average of each test supposing that each test weighs 20%.

  What transform a network to a secure network

How do I transform a network to the secure network? What tools should I have and what kind of hardware do I need to have a basic secure network.

  Develop a plan on how to support a business

Develop a plan on how to support a business need with software, this software will have data points that we need to map.

  While running snort ids why may there be no alerts

While running Snort IDS why may there be no alerts

  Explain the method to find cost of sorting the relation

Explain the method to find cost of sorting the relation In each case, how many combine passes are required?

  Compare productivity based solutions

Microsoft has expended a lot of effort into developing productivity tools for the Web, particularly with the .NET strategy. though, there are many other tools for creating Web solutions.

  Determining the compliment of a number

Express 64 as the 2’s compliment number. Specify the number of bits you require? With this number of bits, state the largest positive number you may represent?

  Developing the gui application

Write down a GUI application which prompts user for a number between 1 and 5. Be sure to involve error checking so that program continues to prompt the user for a number till the user's entry is between 1 and 5, inclusive.

  Uses and developing the class diagram

Choose one of the uses and develop a class diagram. Generate a sequence diagram for use case that you had selected.

  Feel free to research the internet

Did OOD/OOP meet the predictions? Feel free to research the internet.although , you should write a few sentences in your own words.

  Bit binary counter utilizing ltl.

State the three bit counter utilizing the LTL. The following are the properties we may wish to try and prove are valid given the specification of the three bit counter. Eventually the counter reaches 111.

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