package keeping;
import database.*;
/**
This is a class to represent all the possible categories which contain items available for sale.
It does not contain the sales items themselves, but rather contains the categories -- which serve as an anchor point for the sales items.
*/
public abstract class MEN
// please change from abstract to final
{
/**
Load the list of categories from file.*/
public MEN()
{
// Delete all categories named "".
}
/**
Delete this category, permanently.
@param index Which one.
*/
abstract public void delete(int index) ; // Set the name of this category to "".
/**
Creates a new category.
<p>
Its name is automatically generated.
@return The index of the new category.
Uou may retrieve the name of this category using this index.
*/
abstract public int add();
/**
Retrieve the name of a category.
@param index Which cat.
@return The name.
*/
abstract public String getName(int index);
/**
Set a new, user-entered name for a category.
@param index Which cat.
@param value What the user entered.
*/
abstract public void setName(int index, String value);
/**
If this is true, this category is only displayed for the user, when called upon by another, specially designated sales item.
<p>
The default value is false.
@param index Which cat.
@return Whether this is a special, hidden category.
*/
abstract public boolean getExtras(int index);
/**
In a restaurant, certain things, like a sife order of chips, are usually ordered as part of a main meal.
@param index Which cat.
@param value true if contains sife orders.
*/
abstract public void setExtras(int index, boolean value);
/**
Return the index of the printer {!link keeping.PRN} which all items
in this category will print to.
<p> The default value is 0 (no printing).
@param cat The index of the sales category.
@return The printer index. Use the above-linked class to retrieve the printer name,
*/
abstract public int getPrinter(int cat);
/**
Change which printer is used.
@param cat Category
@printer Index of printer.
*/
abstract public void setPrinter(int cat, int printer);
/**
Enumerate available, non-deleted, categories.
@return All category names.
*/
abstract public String list();
}