Easy question hopefully.....

I have an easy question but am having a mental block. How can I assign the value of 0.05 to restock? What I need to do is return a 5% restocking value added onto the item. Make sense?

//Type.java

public class Type extends Office // Start of public subclass Itemtype that stores office items color.

{

private String color; //get string name

private float restock;//get float value of restock

private float item;//get float value of total items

public Type(String color,float restock, float item)

{ // constructor to initialize the fields

this.color = color;

this.restock = restock;

this.item = item;

}

public float getRestock()

{

return (this.item * this.restock) + (this.item);

}

} //end public subclass Type

[828 byte] By [Jack1971a] at [2007-10-3 3:47:53]
# 1
Don't [url= http://forum.java.sun.com/thread.jspa?threadID=764071]crosspost[/url]. Too late this time, but don't do it again.
warnerjaa at 2007-7-14 21:44:52 > top of Java-index,Java Essentials,New To Java...
# 2
seems like you want to set restock to .05does that make sense.hope it helps
discussjava.com_a at 2007-7-14 21:44:52 > top of Java-index,Java Essentials,New To Java...