Разработка иерархии классов и интерфейсов для предметной области "Напитки", страница 2

public ArrayList<Address> _addresses;

int last_id = 0;

public int getLastID()

public AddressManager()

public void Add(String country, String region, String city, String street, String home)

public String getCountry(int index)

public String getRegion(int index)

public String getCity(int index)

public String getStreet(int index)

public String getHome(int index)

public int getID(int index)

public int getIndexByID(int id)

Тип данных Напиток

public class Beverage implements Serializable{

private int _id;

private int _makerID;

private int _supplierID;

private int _warehouseID;

private String _name;

private boolean _isAlcohol;

private boolean _isFizzy;

private boolean _isHot;

Date _dateOfManufacture;

public Beverage(String name, boolean isAlcohol, boolean isFizzy, boolean isHot, Date dateOfManufacture, int makerID, int supplierID, int warehouseID, int id)

public void setName(String name)

public void setDateOfManufacture(Date dateOfManufacture)

public void setIsAlcohol(boolean isAlcohol)

public void setIsFizzy(boolean isFizzy)

public void setIsHot(boolean isHot)

public void setID(int id)

public void setMakerID(int makerID)

public void setSupplierID(int supplierID)

public void setWarehouseID(int warehouseID)

public String getName()

public Date getDateOfManufacture()

public boolean getIsAlcohol()

public boolean getIsFizzy()

public boolean getIsHot()

public int getID()

public int getMakerID()

public int getSupplierID()

public int getWarehouseID()

Тип данных Производитель

public class Maker implements Serializable{

private int _addressID;

private int _id;

private String _name;

public Maker(String name, int addressID, int id)

public int getAddressID()

public String getName()

public int get_id()

ТипданныхМенеджерпроизводителей

public class MakerManager implements Serializable{

private ArrayList<Maker> _maker;

int last_id = 0;

public int getLastID()

public MakerManager()

public void Add(String name, int addressID)

public int getAddressID(int index)

public String getName(int index)

public int getID(int index)

public int getLength()

public int getIndexByID(int id)

Тип данных Порция

public class Portion extends Beverage {

private float _price;

private int _volume;

private int _weight;

public Portion(String name, boolean isAlcohol, boolean isFizzy, boolean isHot, Date dateOfManufacture, int makerID, int supplierID, int warehouseID, int id, float price, int volume, int weight)

public void setPrice(float price)

public void setVolume(int volume)

public void setWeight(int weight)

public float getPrice()

public int getVolume()

public int getWeight()

ТипданныхМенеджерпорций

public class PortionManager implements Serializable{

private ArrayList<Portion> _portions;

int last_id = 0;

public int getLastID()

public PortionManager()

public void AddPortion(String name, boolean isAlcohol, boolean isFizzy, boolean isHot, Date dateOfManufacture, int makerID, int supplierID, int warehouseID, float price, int volume, int weight)

public void EditPortion(String name, boolean isAlcohol, boolean isFizzy, boolean isHot, Date dateOfManufacture,float price, int volume, int weight, int index)

public String getName(int index)

public boolean getIsAlcohol(int index)

public boolean getIsFizzy(int index)

public boolean getIsHot(int index)

public int getID(int index)

public int getMakerID(int index)

public int getSupplierID(int index)

public int getWarehouseID(int index)

public float getPrice(int index)

public int getVolume(int index)

public int getWeight(int index)

public Date getDateOfManufacture(int index)

public int getLength()

public void setSupplierID(int value, int index)

public void setMakerID(int value, int index)

public void setWarehouseID(int value, int index)

public void DeletePortion(int id)

public void DeletePortion(String name)

 int getIndexById(int id)

Тип данных Поставщик