Advertisement
backlight0815

Untitled

Jul 24th, 2022
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. package sample;
  2. import java.util.ArrayList;
  3. public class Customer {
  4. //1) attributes / variables
  5. private String name;
  6. private int password;
  7. //like [] but we don't have to specify the size
  8. //to check whether you can enter / exit
  9. private ArrayList<Ticket> myTiceket = new ArrayList<Ticket>();
  10.  
  11. //2) constructors
  12. public Customer(String name, int password) {
  13. this.name = name;
  14. this.password = password;
  15. }
  16.  
  17. //3) getter & setter & method
  18. public String getName() {
  19. return name;
  20. }
  21. public void setName(String name) {
  22. this.name = name;
  23. }
  24. public int getPassword() {
  25. return password;
  26. }
  27. public void setPassword(int password) {
  28. this.password = password;
  29. }
  30. public ArrayList<Ticket> getMyTiceket() {
  31. return myTiceket;
  32. }
  33. public void setMyTiceket(ArrayList<Ticket> myTiceket) {
  34. this.myTiceket = myTiceket;
  35. }
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement