Hi, I'm having a little problem doing my homework which is due in less than 24 hours. XD
Here are the attributes (please pay attention to the constant values which are the types of wine):
private String name; private int type; private String origin; private double cost; final static int red = 1, white = 2, pink = 3;
Method toString
public String toString(){ return "\n\t" + getName() + " is a " + getType() + " wine from " + getOrigin() + " and it costs " + getCost() + "$.";
My problem: I need to create a private method to get the type of wine as a string. toString will be using this private method. Can anyone please help me? Thank you in advance!