The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 2 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Need the following java program completed:
Â
import java.util.ArrayList;
Â
/**
 * Manage the stock in a business.
 * The stock is described by zero or more Products.
 *Â
 * @author (your name)Â
 * @version (a version number or a date)
 */
public class StockManager
{
  // A list of the products.
  private ArrayList<Product> stock;
Â
  /**
   * Initialise the stock manager.
   */
  public StockManager()
  {
    stock = new ArrayList<>();
  }
Â
  /**
   * Add a product to the list.
   * @param item The item to be added.
   */
  public void addProduct(Product item)
  {
    stock.add(item);
  }
  Â
  /**
   * Receive a delivery of a particular product.
   * Increase the quantity of the product by the given amount.
   * @param id The ID of the product.
   * @param amount The amount to increase the quantity by.
   */
  public void delivery(int id, int amount)
  {
  }
  Â
  /**
   * Try to find a product in the stock with the given id.
   * @return The identified product, or null if there is none
   *    with a matching ID.
   */
  public Product findProduct(int id)
  {
    return null;
  }
  Â
  /**
   * Locate a product with the given ID, and return how
   * many of this item are in stock. If the ID does not
   * match any product, return zero.
   * @param id The ID of the product.
   * @return The quantity of the given product in stock.
   */
  public int numberInStock(int id)
  {
    return 0;
  }
Â
  /**
   * Print details of all the products.
   */
  public void printProductDetails()
  {
  }
}
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly