-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProduct.java
84 lines (70 loc) · 1.42 KB
/
Product.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package osu.cse2123;
/**
* Product
*
* A simple interface for a possible family of Product
* classes.
*
* @author Frank He
* @version 03072018
*/
import java.util.Scanner;
public interface Product {
/*
* setName
* @param name - new name for the product
*/
public void setName(String name);
/*
* getName
* @return the name of the product
*/
public String getName();
/*
* setType
* @param type - the type of the product
*/
public void setType(String type);
/*
* getType
* @return - the product type
*/
public String getType();
/*
* setPrice
* @param price - the price of the product
*/
public void setPrice(double price);
/*
* getPrice
* @return the price of the product
*/
public double getPrice();
/*
* setQuantity
* @param quantity - the number of this product in inventory
*/
public void setQuantity(int quantity);
/*
* getQuantity
* @return the number of this product in inventory
*/
public int getQuantity();
/*
* setInStock
* @param inStock - true if this product is in stock
*/
public void setInStock(boolean inStock);
/*
* getQuantity
* @return true if this product is in stock
*/
public boolean getInStock();
/*
* readNextProduct
* @param inFile - a Scanner containing product entries
* @return false if the product cannot be completely read,
* true otherwise
*/
public boolean readNextProduct(Scanner inFile);
}