Advertisement
moreiramota

Untitled

Dec 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package lapr.project.model;
  7.  
  8. import lapr.project.data.BicycleDB;
  9.  
  10. /**
  11. *
  12. * @author joaoflores
  13. */
  14. public class EBicycle extends Bicycle {
  15.  
  16. float tension;
  17. float batteryCapacity;
  18. float batteryRemain;
  19. float motor_power;
  20.  
  21. public EBicycle(int id_bicycle, int type, String available, float tension, float battery_capacity, float battery_remain, float motor_power) {
  22. super(id_bicycle, type, available);
  23. this.tension = tension;
  24. this.batteryCapacity = battery_capacity;
  25. this.batteryRemain = battery_remain;
  26. this.motor_power = motor_power;
  27. }
  28.  
  29. public float getTension() {
  30. return tension;
  31. }
  32.  
  33. public void setTension(float tension) {
  34. this.tension = tension;
  35. }
  36.  
  37. public float getBattery_capacity() {
  38. return batteryCapacity;
  39. }
  40.  
  41. public void setBattery_capacity(float battery_capacity) {
  42. this.batteryCapacity = battery_capacity;
  43. }
  44.  
  45. public float getBattery_remain() {
  46. return batteryRemain;
  47. }
  48.  
  49. public void setBattery_remain(float battery_remain) {
  50. this.batteryRemain = battery_remain;
  51. }
  52.  
  53. public float getMotor_power() {
  54. return motor_power;
  55. }
  56.  
  57. public void setMotor_power(float motor_power) {
  58. this.motor_power = motor_power;
  59. }
  60.  
  61. public static void addEletricBicycle(EBicycle b) {
  62. new BicycleDB().addEletricBicycle(b);
  63. }
  64.  
  65. public static Bicycle getEletricBicycle(int id) {
  66. return new BicycleDB().getEletricBicycle(id);
  67. }
  68.  
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement