Class Product

Object
Product

public class Product extends Object
This class is to be used as a container for Product data. Each file within the "ShipmentFolder" will have enough information to create a Product.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) int
     
    (package private) String
     
    (package private) double
     
    (package private) int
     
    (package private) int
     
    (package private) double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for Product, all values are set to be invalid.
    Product(String name, int sku, double price, double weight, int destination, int quantity)
    Overloaded constructor that requires all values for construction.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the destination int.
    Gets the name String.
    Returns String format of a Product object.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • name

      String name
    • sku

      int sku
    • price

      double price
    • weight

      double weight
    • destination

      int destination
    • quantity

      int quantity
  • Constructor Details

    • Product

      public Product()
      Default constructor for Product, all values are set to be invalid.
    • Product

      public Product(String name, int sku, double price, double weight, int destination, int quantity)
      Overloaded constructor that requires all values for construction.
      Parameters:
      name -
      sku -
      price -
      weight -
      destination -
      quantity -
  • Method Details

    • getName

      public String getName()
      Gets the name String.
      Returns:
    • getDestination

      public int getDestination()
      Gets the destination int.
      Returns:
    • toString

      public String toString()
      Returns String format of a Product object.
      Overrides:
      toString in class Object