If I put commas after public Invoice ( String number ) and void setPartNumber( String number ) I get error method not found, or abstract with this code. Currently getting error message ";" on these 2/3 lines; didnt include 3rd line with same message.
Code:
public class Invoice
{
private String partNumber; // part number for this Invoice
private int partQty; // part qty for this Invoice
// constructor initializes partNumber with String supplied as argument
public Invoice( String number )
// constructor initializes partQty with int supplied as argument
public Invoice( int qty )
{
partNumber = number; // initializes partNumber
partQty = qty; // intializes partQty
} // end constructor
// method to set part number
public void setPartNumber( String number )
// method to set part qty
public void setPartQty( int qty )
{
partNumber = number; // store the part number
partQty = qty; // store part qty
} // end method setPartNumber
// end method setPartQty
// method to retrieve the part number
public String getPartNumber()
// method to retrieve the part qty
public int getPartQty()
{
return partNumber;
return partQty;
// end method getPartNumber
Please, no direct answer...hint or point to book or website
Comment