Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. public class Diseases {
  2. protected String name;
  3. protected double fatality; // how long it takes for people t die
  4. protected double spreadRate; // how long it takes to spread to other countries
  5. protected double resistance;
  6.  
  7. public Diseases(double a, double b, String c) {
  8. fatality = a;
  9. spreadRate = b;
  10. name = c;
  11. }
  12.  
  13. public double getFatality() {
  14. return fatality;
  15. }
  16.  
  17. public void setFatality(double fatality) {
  18. this.fatality = fatality;
  19. }
  20.  
  21. public double getSpreadRate() {
  22. return spreadRate;
  23. }
  24.  
  25. public void setSpreadRate(double spreadRate) {
  26. this.spreadRate = spreadRate;
  27. }
  28.  
  29. public String getName() {
  30. return name;
  31. }
  32.  
  33. public void mutate1(double a, double b) {
  34.  
  35. fatality = a + 2;
  36. spreadRate = b + 1;
  37.  
  38. }
  39.  
  40. public void mutate2(double a, double b) {
  41. fatality = a + 1;
  42. spreadRate = b + 2;
  43.  
  44. }
  45.  
  46. public double getResistance() {
  47. return resistance;
  48. }
  49.  
  50. public void setResistance(double resistance) {
  51. this.resistance = resistance;
  52. }
  53.  
  54. public void setName(String name) {
  55. this.name = name;
  56. }
  57.  
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement