/home/caleb/ASDV-Java/Semester 2/Assignments/MP4_CalebFontenot/src/main/java/com/calebfontenot/mp4_calebfontenot/MountainBike.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 MountainBike extends Bicycle
{

    private int seatHeight;

    @Override
    public boolean equals(Object obj)
    {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final MountainBike other = (MountainBike) obj;
        System.out.println("Super returns: " + super.equals(obj));
        return this.seatHeight == other.seatHeight && super.equals(obj);
    }

    public MountainBike(int seatHeight, int cadence, int gear, int speed)
    {
        super(cadence, gear, speed);
        this.seatHeight = seatHeight;
    }

    public int getSeatHeight()
    {
        return seatHeight;
    }

    public void setSeatHeight(int seatHeight)
    {
        this.seatHeight = seatHeight;
    }

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

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

}