[go: up one dir, main page]

Menu

[r40]: / keeping / SSI.java  Maximize  Restore  History

Download this file

51 lines (50 with data), 1.5 kB

 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
package keeping;
import database.*;
/**
A simple class allowing for the utilisation of: the list of inventory items -- both current and shadow.
<p>
Current means items visible for the user to include in sales items.
Shadow means items which have been deleted, but which are still maintained so that historical transactions may be reversed.
*/
abstract public class SSI
// please change from abstract to final.
{
/**
Loads the list of items from file.
@param showDeleted False for normal use. True for transaction reversals.
*/
public SSI(boolean showDeleted)
{
// not implemented
}
/**
Add a completely new stock item to the list.
@param goodName The new, unique name for this stock item.
@param uom Units of measure. KG, Litres and so on.
*/
public abstract void add(String goodName, String uom);
/**
Mark an inventory item as shadow.
@param index The offfset/number in the list() array.
*/
public abstract void delete(int index);
/**
Return a list of all inventory items which have not yet been deleted.
@return The list of names.
*/
public abstract String[] list();
/**
Make a previously delted item visible again.
<p>
If the item is already visible, this function does nothing.
@param goodName A name of an inventory item, shadow or normal.
*/
public abstract void revive(String goodName); // You may need to completely reload your data here.
/**
Test case.
*/
public static void main(String[] ignore)
{
// please complete.
}
}