Guest User

Car

a guest
Jul 14th, 2020
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. import java.util.ArrayList;
  2.  
  3. public class Car {
  4. private String model;
  5. private int engine;
  6. private int hp;
  7. private int cargoW;
  8. private String typeCargo;
  9. private ArrayList<Tyre>tires;
  10.  
  11.  
  12. public Car(String model, int engine, int hp, int cargoW, String typeCargoe,ArrayList<Tyre>tires) {
  13. this.model = model;
  14. this.engine = engine;
  15. this.hp = hp;
  16. this.cargoW = cargoW;
  17. this.typeCargo = typeCargo;
  18. this.tires=tires;
  19.  
  20. }
  21.  
  22. public ArrayList<Tyre> getTires() {
  23. return tires;
  24. }
  25.  
  26. public void setTires(ArrayList<Tyre> tires) {
  27. this.tires = tires;
  28. }
  29.  
  30. public String getModel() {
  31. return model;
  32. }
  33.  
  34. public void setModel(String model) {
  35. this.model = model;
  36. }
  37.  
  38. public int getEngine() {
  39. return engine;
  40. }
  41.  
  42. public void setEngine(int engine) {
  43. this.engine = engine;
  44. }
  45.  
  46. public int getHp() {
  47. return hp;
  48. }
  49.  
  50. public void setHp(int hp) {
  51. this.hp = hp;
  52. }
  53.  
  54. public int getCargoW() {
  55. return cargoW;
  56. }
  57.  
  58. public void setCargoW(int cargoW) {
  59. this.cargoW = cargoW;
  60. }
  61.  
  62. public String getTypeCargo() {
  63. return typeCargo;
  64. }
  65.  
  66. public void setTypeCargo(String typeCargo) {
  67. this.typeCargo = typeCargo;
  68. }
  69. }
Add Comment
Please, Sign In to add comment