Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package moff.demo;
- import javax.swing.JButton;
- public class Person
- {
- private JButton diseased;
- private JButton hungry;
- private String name;
- public Person(String name)
- {
- this.name = name;
- diseased = new JButton();
- hungry = new JButton();
- }
- public void makeDiseased()
- {
- // Check the diseased button.
- // diseased.check() or whatever
- }
- public void removeDiseased()
- {
- // Clear the diseased button.
- // diseased.uncheck() or whatever
- }
- public void makeHungry()
- {
- // Check the Hungry button.
- // hungry.check() or whatever
- }
- public void removeHungry()
- {
- // Clear the Hungry button.
- // hungry.uncheck() or whatever
- }
- public JButton getDiseased()
- {
- return diseased;
- }
- public JButton getHungry()
- {
- return hungry;
- }
- public String getName()
- {
- return name;
- }
- }
Add Comment
Please, Sign In to add comment