Advertisement
Guest User

cart

a guest
Nov 24th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. public class Cart extends Sprite{
  2.  
  3.  
  4. private int PassengerLimit = 200; //Default Passenger limit is 200.
  5.  
  6. //will be set with a text field
  7.  
  8. private int CartLength = 30; //In Meters, the default cart length is 30m.
  9.  
  10. private int NumberOfPassengersEntering;
  11.  
  12. //The # of Passengers entering a cart will affect overall Train wait time
  13.  
  14. public Cart(String Cart, int CartLength) {
  15. super (CartLength, CartLength, Cart)
  16.  
  17. }
  18.  
  19.  
  20.  
  21. public int getPassengerLimit(){
  22.  
  23. return PassengerLimit;
  24.  
  25.  
  26. }
  27.  
  28. }
  29.  
  30.  
  31.  
  32.  
  33.  
  34. public void setPassengerLimit(int PassengerLimit){
  35.  
  36. this.PassengerLimit = PassengerLimit;
  37.  
  38.  
  39.  
  40. }
  41.  
  42.  
  43.  
  44. public int getCartLength(){ //CartLength is in METERS and integers between 20 & 30.
  45.  
  46. return CartLength;
  47.  
  48.  
  49. }
  50.  
  51.  
  52.  
  53.  
  54.  
  55. public void setCartLength(int CartLength){
  56.  
  57. this.CartLength = CartLength;
  58.  
  59. }
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement