Package exceptions

Examples of exceptions.InsufficientFoodException


          for(Person p : World.getWagon().getPassengers()){
            p.eatFood(ration*5);
            p.drinkWater(3);
          }
        } else {
          throw new InsufficientFoodException();
        }
       
      } catch (InsufficientFoodException e) {
        //e.printStackTrace();
        for(Person p : World.getWagon().getPassengers()){
View Full Code Here


              p.eatFood(ration * 5);
              p.drinkWater(2);
            }
          }
        } else {
          throw new InsufficientFoodException();
        }
       
      } catch (InsufficientFoodException e) {
        //e.printStackTrace();
        for(Person p : World.getWagon().getPassengers()){
View Full Code Here

TOP

Related Classes of exceptions.InsufficientFoodException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.