package com.ace_is_solutions.funfacts;

import java.util.Random;

/**
 * Created by Family on 10/21/2015.
 */
public class FactBook {
    // Member variables (properties about the object)
    //
    // Info to update Fact Label with a new Fact;
    public String[] mFactoid  = {
                "Ants stretch when they wake up in the morning.",
                "Ostriches can run faster than horses.",
                "Olympic gold medals are actually made mostly of silver.",
                "You are born with 300 bones; by the time you are an adult you will have 206.",
                "It takes about 8 minutes for light from the Sun to reach Earth.",
                "Some bamboo plants can grow almost a meter in just one day.",
                "The state of Florida is bigger than England.",
                "Some penguins can leap 2-3 meters out of the water.",
                "On average, it takes 66 days to form a new habit.",
                "Mammoths still walked the earth when the Great Pyramid was being built."};

    // Method/s (abilities: things the object can do)
    public String getFact() {
        // define var
        String fact = "";
        // Randomly select a Fact from Book
        //
        // Construct & Generate a Random number generator
        Random randGenr = new Random();                // construct
        int randNumr = randGenr.nextInt(mFactoid.length); // generate
        // load Fact
        //fact = randNumr + "";               // load n cvt to str
        fact = mFactoid[randNumr];
        return fact;
    }
}
