Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package lapr.project.model;
- import lapr.project.data.BicycleDB;
- /**
- *
- * @author joaoflores
- */
- public class EBicycle extends Bicycle {
- float tension;
- float batteryCapacity;
- float batteryRemain;
- float motor_power;
- public EBicycle(int id_bicycle, int type, String available, float tension, float battery_capacity, float battery_remain, float motor_power) {
- super(id_bicycle, type, available);
- this.tension = tension;
- this.batteryCapacity = battery_capacity;
- this.batteryRemain = battery_remain;
- this.motor_power = motor_power;
- }
- public float getTension() {
- return tension;
- }
- public void setTension(float tension) {
- this.tension = tension;
- }
- public float getBattery_capacity() {
- return batteryCapacity;
- }
- public void setBattery_capacity(float battery_capacity) {
- this.batteryCapacity = battery_capacity;
- }
- public float getBattery_remain() {
- return batteryRemain;
- }
- public void setBattery_remain(float battery_remain) {
- this.batteryRemain = battery_remain;
- }
- public float getMotor_power() {
- return motor_power;
- }
- public void setMotor_power(float motor_power) {
- this.motor_power = motor_power;
- }
- public static void addEletricBicycle(EBicycle b) {
- new BicycleDB().addEletricBicycle(b);
- }
- public static Bicycle getEletricBicycle(int id) {
- return new BicycleDB().getEletricBicycle(id);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement