Guest User

Tyre

a guest
Jul 15th, 2020
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. public class Tyre {
  2. private double pressure1;
  3. private int age1;
  4. private double pressure2;
  5. private int age2;
  6. private double pressure3;
  7. private int age3;
  8. private double pressure4;
  9. private int age4;
  10.  
  11. public Tyre(double pressure1, int age1, double pressure2, int age2, double pressure3, int age3, double pressure4, int age4) {
  12. this.pressure1 = pressure1;
  13. this.age1 = age1;
  14. this.pressure2 = pressure2;
  15. this.age2 = age2;
  16. this.pressure3 = pressure3;
  17. this.age3 = age3;
  18. this.pressure4 = pressure4;
  19. this.age4 = age4;
  20. }
  21.  
  22. public double getPressure1() {
  23. return pressure1;
  24. }
  25.  
  26. public void setPressure1(double pressure1) {
  27. this.pressure1 = pressure1;
  28. }
  29.  
  30. public int getAge1() {
  31. return age1;
  32. }
  33.  
  34. public void setAge1(int age1) {
  35. this.age1 = age1;
  36. }
  37.  
  38. public double getPressure2() {
  39. return pressure2;
  40. }
  41.  
  42. public void setPressure2(double pressure2) {
  43. this.pressure2 = pressure2;
  44. }
  45.  
  46. public int getAge2() {
  47. return age2;
  48. }
  49.  
  50. public void setAge2(int age2) {
  51. this.age2 = age2;
  52. }
  53.  
  54. public double getPressure3() {
  55. return pressure3;
  56. }
  57.  
  58. public void setPressure3(double pressure3) {
  59. this.pressure3 = pressure3;
  60. }
  61.  
  62. public int getAge3() {
  63. return age3;
  64. }
  65.  
  66. public void setAge3(int age3) {
  67. this.age3 = age3;
  68. }
  69.  
  70. public double getPressure4() {
  71. return pressure4;
  72. }
  73.  
  74. public void setPressure4(double pressure4) {
  75. this.pressure4 = pressure4;
  76. }
  77.  
  78. public int getAge4() {
  79. return age4;
  80. }
  81.  
  82. public void setAge4(int age4) {
  83. this.age4 = age4;
  84. }
  85. }
Add Comment
Please, Sign In to add comment