daily pastebin goal
69%
SHARE
TWEET

Untitled

a guest Dec 13th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. public class Patients {
  3.     public String name;
  4.     Patients(String name) {
  5.         this.name = name;
  6.     }
  7.     public String name() {
  8.         return name;
  9.     }
  10.     public String illness() {
  11.         return "";
  12.     }
  13.     public String treatment() {
  14.         return "";
  15.     }
  16.  
  17. }
  18. class IllHead extends Patients  {
  19.    
  20.     public IllHead(String name) {
  21.         super(name);
  22.     }
  23.    
  24.     @Override public String illness() {
  25.         return "head";
  26.     }
  27.     @Override public String treatment() {
  28.         return "aspirin";
  29.     }
  30. }
  31. class IllLeg extends Patients {
  32.     public IllLeg(String name) {
  33.         super(name);
  34.     }
  35.     @Override public String illness() {
  36.         return "leg";
  37.     }
  38.     @Override public String treatment() {
  39.         return "plaster";
  40.     }
  41. }
  42. class IllDyspepsia extends Patients {
  43.     public IllDyspepsia(String name) {
  44.         super(name);
  45.     }
  46.     @Override public String illness() {
  47.         return "dyspepsia";
  48.     }
  49.     @Override public String treatment() {
  50.         return "coal";
  51.     }
  52. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top