Java- GregorianCalander
- by namitjain23
Hey guys, i know this is a very simple question but i am new to Java so please bare with me. I have create a program that can calculate the time a book is due to come back after being issed! 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
Basically i need to replace that Calendar.DATE to get me calculations right. I need to calculate the date passed by the TEST file and calulate the date it will be returned. This project needs to be submitted TOMORROW, so please please help me out!