Package lab4

Class Furniture

java.lang.Object
lab4.Furniture
All Implemented Interfaces:
Comparable<Furniture>

public class Furniture extends Object implements Comparable<Furniture>
My class Furniture.
  • Constructor Details

    • Furniture

      public Furniture(String material, int length, int height, int width, int price)
      Our class constructor.
      Parameters:
      material - Material with which furniture was made of
      length -
      height -
      width -
      price -
  • Method Details

    • setMaterial

      public void setMaterial(String material)
    • getMaterial

      public String getMaterial()
    • getLength

      public int getLength()
    • getHeight

      public int getHeight()
    • getWidth

      public int getWidth()
    • getPrice

      public int getPrice()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(Furniture o)
      Specified by:
      compareTo in interface Comparable<Furniture>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object