Define both abstract methods inherited from disease class

Assignment Help JAVA Programming
Reference no: EM131577051

Diseases

Create two class: Zika and Plage. Each of these classes extend the Disease class. Each of these class must define (override) both abstract methods inherited from disease.

Foe each, when creating objects, the name password in should just be the name of the disease.
Zika class: The security should be an integer between 0 and 10 (inclusive).
public void impact(Person p)
// Precondition: none
// Postconditions: none
// Side Effects:
// (1) the person's health will be decreased by the value of the severity of the disease
// (2) The disease's severity will be reduced by 1 (until it reaches zero)
// (3) The disease's chance of transmission is reduced by 10% (i.e. 0.9 - current chance of transmission)
public void treat()
// Pre and postcoaditions: none
// Side Effects: Both the severity and chance of transmission are reduced by a factor of 2. (i.e. each is //replaced by 1/2 of the current value, using Integer division for severity)
- Plague class: The severity should be an integer between 0 and 100 (inclusive).
public void impact(Person p)
// Pre and postconditions: none
// Side Effects:
// (1) the person's health will be decreased by 5 if the severity if larger than SO and decreased by 2 if the severity is less than or equal to SO
public void treat()
// Pre and postconditionsl none
// Side Effects: Severity is reduced by a factor of 3 (1.e. it is replaced by 1/3
// of the current value, using integer division)
// Chance of transmission remains the same.

Reference no: EM131577051

Questions Cloud

Welfare has improved by 10-percent over the year : Explain why we cannot necessarily conclude that the typical Canadian's welfare has improved by 10-percent over the year.
Oversupply of two of the specialties : Explain why there is an oversupply of two of the following specialties.
What was the cost of raw materials : What was the cost of raw materials put into production during the year? What was the cost of goods manufactured for the year
Debate outline create a series of comments or a crib-sheet : Attitudes toward the United States, Global prosperity is at its highest point in the past decade
Define both abstract methods inherited from disease class : Each of these classes extend the Disease class. Each of these class must define (override) both abstract methods inherited from disease
Production technology is given by the production function : Where L represents labor hours, K machine hours and q the amount of output. The market wage and rental rates are, w= $25 and r = $100.
Construct a circuit for a half subtractor : Construct a circuit for a half subtractor using AND gates, OR gates, and inverters. A half subtractor has two bits as input and produces as output a difference.
Calculate optimal profit : Calculate the number of occupied units. Assuming that fixed cost is $704 calculate optimal profit.
Write an instruction for feeding an infant : Write an instruction for feeding an infant. If you have some personal experience in this area, you may use this experience as a source of information.

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