Inventory.java 622B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import java.util.*;
  2. /**
  3. * Write a description of class Inventory here.
  4. *
  5. * @author (your name)
  6. * @version (a version number or a date)
  7. */
  8. public class Inventory extends Product
  9. {
  10. String id;
  11. Scanner scan = new Scanner(System.in);
  12. public Inventory (String id) {
  13. super(id);
  14. }
  15. public String id (String id) {
  16. return id;
  17. }
  18. public double totalValue(int amt, double cost) {
  19. return quant * price;
  20. }
  21. public int quant(int amt) {
  22. return quant;
  23. }
  24. public double price(double cost) {
  25. return price;
  26. }
  27. }