Guest User

Untitled

a guest
Jul 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. package moff.demo;
  2.  
  3. import javax.swing.JButton;
  4.  
  5. public class Person
  6. {
  7. private JButton diseased;
  8. private JButton hungry;
  9. private String name;
  10.  
  11. public Person(String name)
  12. {
  13. this.name = name;
  14. diseased = new JButton();
  15. hungry = new JButton();
  16. }
  17.  
  18. public void makeDiseased()
  19. {
  20. // Check the diseased button.
  21. // diseased.check() or whatever
  22. }
  23.  
  24. public void removeDiseased()
  25. {
  26. // Clear the diseased button.
  27. // diseased.uncheck() or whatever
  28. }
  29.  
  30. public void makeHungry()
  31. {
  32. // Check the Hungry button.
  33. // hungry.check() or whatever
  34. }
  35.  
  36. public void removeHungry()
  37. {
  38. // Clear the Hungry button.
  39. // hungry.uncheck() or whatever
  40. }
  41.  
  42. public JButton getDiseased()
  43. {
  44. return diseased;
  45. }
  46.  
  47. public JButton getHungry()
  48. {
  49. return hungry;
  50. }
  51.  
  52. public String getName()
  53. {
  54. return name;
  55. }
  56. }
Add Comment
Please, Sign In to add comment