L'ajout de Jours de Calendrier

Je suis nouveau sur ce site et j'ai juste commencé à apprendre le Java. Je suis en train d'ajouter quelques jours à la GregorianCalendar mais ça ne fonctionne pas. Ici... (Ignorer le top chunk), c'est l'ajout de dates en bas qui est ennuyeux.

/*
 * Author:Matt M
 * Date:8.12.13
 * Discription: When the user inputs the deadline, and the difficulity of the project, 
 * the program gives the date he should start working on it 
 */
import java.util.*;
public class DeadlinePlanner{
    public static void main(String[] args)
    {
        //take information and restart questions if information is wrong 
        int month = 0, day = 0 ; 
        do
        {
        do
        {
        System.out.println("Input the month please");
        month = (new Scanner(System.in).nextInt() - 1);
        System.out.println("Input the day please");
        day = (new Scanner(System.in).nextInt());

        }
        while (!(month <= 12) || !(month >= 0));
        }
       while (!(day <= 31) || !(month >= 0));

       //Make new calender and initialize it 
       GregorianCalendar setup = new GregorianCalendar();
       setup.set(2013, month, day);
       System.out.println("The deadline is "+ setup.getTime());

       //switch statement to give starting date
       System.out.println("Is the project hard or easy?");
       Scanner difficulity = new Scanner(System.in);

       switch (difficulity.nextLine())
       {

           case "easy":


               setup.add(day, -1);
               System.out.print("The date you should start workinng on is ");
               System.out.println(setup.getTime());
               break;
           case "hard":

               setup.add(day, -10);
               System.out.print("The date you should start workinng on is ");
               System.out.println(setup.getTime());

               break;
           default:
               System.out.println("Your answers to the questions are incorrect");
               break;
       }

    }
}

Merci pour la lecture par le biais de ce!Je suis ouvert à tout commentaires...

OriginalL'auteur user2676580 | 2013-08-12