Hey guys, I know this is a very simple question but I am new to Java so please bear with me. I have create a program that can calculate the time a book is due to come back after being issued! So please help me out.
Here is the piece of code that I have:
public void loan(int numOfDays) {
if( onLoan == true) {
System.out.println("Already on Loan, Return Date : "+Calendar.DATE );
}
else {
due.set( numOfDays, Calendar.DATE );
System.out.println("Available");
onLoan = true;
} }
// Mark the book as having been returned
I need to replace that Calendar.DATE to get my calculations right. I need to calculate the date passed by the TEST file and calculate the date it will be returned. This project needs to be submitted TOMORROW, so please please help me out!