Package bookstore

Class DVD

java.lang.Object
bookstore.DVD

public class DVD extends Object
Represents a DVD
  • Constructor Details

    • DVD

      public DVD(String name, String category, double price, int stock)
      Constructor for DVD class
      Parameters:
      name - the title of this DVD
      category - the category of this DVD
      price - the price of this DVD
      stock - the amount of this item in stock
  • Method Details

    • getCategory

      public String getCategory()
      Gets the value of the category
      Returns:
      the value of category
    • setCategory

      public void setCategory(String category)
      Assigns the given value to the category field
      Parameters:
      category - new value for category
    • getName

      public String getName()
      Gets the value of the name field
      Returns:
      the value of name
    • setName

      public void setName(String name)
      Assigns the given value to the name field
      Parameters:
      name - new value for name
    • getPrice

      public double getPrice()
      Gets the value of the price field
      Returns:
      the value of price
    • setPrice

      public void setPrice(double price)
      Assigns the given value to the price field
      Parameters:
      price - new value for price
    • getStock

      public int getStock()
      Gets the value of the stock field
      Returns:
      the value of stock
    • setStock

      public void setStock(int stock)
      Assigns the given value to the stock field
      Parameters:
      stock - new value for stock