/**
 * An application that contains examples of pluralization.
 *
 * @author  Prof. David Bernstein, James Madison University
 * @version 1.0
 */ 
public class Pluralization {

    /**
     * The entry point of the application.
     *
     * @param args  The command line arguments
     */
    public static void main(String[] args) {
        int n = 2;
        String result;
        
//[1
        if (n == 1) {
            result = "There is 1 poodle available for adoption.";
        } else {
            result = "There are " + n + " poodles available for adoption.";
        }
//]1
        System.out.println(result);
        

//[2
        result = "There";

        if (n == 1) result += " is";
        else        result += " are";
        
        result += " " + n + " poodle";
        
        if (n > 1) result += "s";
        
        result += " available for adoption.";
//]2
        System.out.println(result);

//[3
        result = "There " + Pluralize.is(n) + " "
            + n + " " + Pluralize.regular(n, "poodle")
            + " available for adoption.";
//]3
        System.out.println(result);

//[4
        result = "There " + Pluralize.is(n) + " "
            + n + " " + Pluralize.form(n, "mouse", "mice")
            + " available for adoption.";
//]4
        System.out.println(result);

//[5
        result = "There " + Pluralize.is(n) + " "
            + n + " sheep available for adoption.";
//]5
        System.out.println(result);
    }
}


