I need to write some code that will count the amount of times someone has borrowed a CD. I tried doing some but just failed and don't have a clue any more.
Like I said, stuck again on something that is probably simple to do:
public void borrower(String nameOfBorrower)
/**
*
*/
{
borrower = nameOfBorrower;
borrowed = true;
inStock = false;
}
public void returned()
/**
*
*/
{
borrower = "";
borrowed = false;
inStock = true;
}
public boolean isBorrowed()
/**
*
*/
{
return borrowed;
}
public void reportInStock()
/**
*
*/
{
if(inStock == false)
{
System.out.println("This CD has been borrowed;" + personName);
}
else
{
System.out.println("This CD is available");
}
}