Class Packet

java.lang.Object
data.Packet

public class Packet extends Object
The Packet class represents a package with specific dimensions (length and height) and weight
  • Constructor Summary

    Constructors
    Constructor
    Description
    Packet(int length, int width, int height, int weight)
    Constructor for the Packet class
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Retrieves the girth of the package
    int
    Retrieves the height of the package
    int
    Retrieves the length of the package
    int
    Retrieves the weight of the package
    int
    Retrieves the width of the package

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Packet

      public Packet(int length, int width, int height, int weight)
      Constructor for the Packet class
      Parameters:
      length - the length of the package in millimeters
      width - the width of the package in millimeters
      height - the height of the package in millimeters
      weight - the weight of the package in grams
  • Method Details

    • getLength

      public int getLength()
      Retrieves the length of the package
      Returns:
      the length of the package in millimeters
    • getWidth

      public int getWidth()
      Retrieves the width of the package
      Returns:
      the width of the package in millimeters
    • getHeight

      public int getHeight()
      Retrieves the height of the package
      Returns:
      the height of the package in millimeters
    • getWeight

      public int getWeight()
      Retrieves the weight of the package
      Returns:
      the weight of the package in grams
    • getGirth

      public int getGirth()
      Retrieves the girth of the package
      Returns:
      the girth of the package in millimeters