/home/caleb/ASDV-Java/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/ChildBike.java
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.calebfontenot.mp4_calebfontenot;

/**
 *
 * @author caleb
 */
public class ChildBike extends Bicycle  //remove comment  in front of extends
{
    @Override
    public boolean equals(Object obj)
    {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ChildBike other = (ChildBike) obj;
        System.out.println("Super returns: " + super.equals(obj));
        return this.helpWheels == other.helpWheels && super.equals(obj);
    }
    
    private boolean helpWheels;

    public ChildBike(boolean helpWheels, int cadence, int gear, int speed)
    {
        super(cadence, gear, speed);
        this.helpWheels = helpWheels;
    }

    public boolean isHelpWheels()
    {
        return helpWheels;
    }

    public void setHelpWheels(boolean helpWheels)
    {
        this.helpWheels = helpWheels;
    }

    @Override
    Details calculatedDetails()
    {
        return Details.getDetails(this);
    }

    @Override
    public String toString()
    {
        return super.toString() + "ChildBike{" + "helpWheels=" + helpWheels + '}';
    }
    
}