//Multi-dimensional array that stores state and state information private String state[][] = { {"ALABAMA", "Nothern Flicker", "Camellia"}, {"ALASKA", "Willow Ptarmigan", "Forget-me-not"}, {"ARIZONA", "Cactus Wren", "Saguaro Cactus Blossom"}, {"ARKANSAS", "Northern Mockingbird", "Apple Blossom"}, {"CALIFORNIA", "California Quail", "California Poppy"}, {"COLORADO", "Lark Bunting", "Rocky Mountain Columbine"}, {"CONNECTICUT", "American Robin", "Mountain Laurel"}, {"DELAWARE", "Delaware Blue Hen", "Peach Blossom"}, {"FLORIDA", "Northern Mockingbird", "Orange Blossom"}, {"GEORGIA", "Brown Thrasher", "Cherokee Rose"}, …show more content…
{"HAWAII", "Hawaiian Goose", "Hawaiian Hibiscus"}, {"IDAHO", "Mountain Bluebird", "Mock Oragnge"}, {"ILLINOIS", "Northern Cardinal", "Purple Violet"}, {"INDIANA", "Cardinal", "Peony"}, {"IOWA", "Eastern Goldfinch", "Wild Prairie Rose"}, {"KANSAS", "Western Meadowlark", "Sunflower"}, {"KENTUCKY", "Northern Cardinal", "Goldenrod"}, {"LOUISIANA", "Brown Pelican", "Magnolia"}, {"MAINE", "Black-capped Chickadee", "White Pine Cone and Tassel"}, {"MARYLAND", "Baltimore Oriole", "Black-eyed Susan"}, {"MASSACHUSETTS", "Black-capped Chickadee", "Mayflower"}, {"MICHIGAN", "American Robin", "Apple Blossom"}, {"MINNESOTA", "Common Ioon", "Cypripedium Reginae"}, {"MISSISSIPPI", "Northern Mockingbird", "Magnolia"}, {"MISSOURI", "Eastern Bluebird", "Hawthorn"}, {"MONTANA", "Western Meadowlark", "Bitterroot"}, {"NEBRASKA", "Western Meadowlark", "Goldenrod"}, {"NEVADA", "Mountain Bluebird", "Sagebrush"}, {"NEW HAMPSHIRE", "Purple Finch", "Purple Lilac"}, {"NEW JERSEY", "Eastern Goldfinch", "Violet"}, {"NEW MEXICO", "Roadruner", "Yucca"},
{"NEW YORK", "Eastern Bluebird", "Rose"}, {"NORTH CAROLINA", "Northern Cardinal", "Flowering Dogwood"}, {"NORTH DAKOTA", "Western Meadowlark", "Wild Prairie Rose"}, {"OHIO", "Northern Cardinal", "Scarlet Carnation"}, {"OKLAHOMA", "Scissor-tailed Flycatcher", "Mistletoe"}, {"OREGON", "Western Meadowlark", "Oregon Grape"}, {"PENNSYLVANIA", "Ruffed Grouse", "Mountain-laurel"}, {"RHODE ISLAND", "Rhode Island Red", "Violet"}, {"SOUTH CAROLINA", "Carolina Wren", "Yellow Jessamine"}, {"SOUTH DAKOTA", "Ring-necked Pheasant", "Pasque Flower"}, {"TENNESSEE", "Nothern Mockingbird", "Iris"}, {"TEXAS", "Northern Mockingbird", "Bluebonnet"}, {"UTAH", "California Gull", "Sego Lily"}, {"VERMONT", "Hermit Thrush", "Red Clover"}, {"VIRGINIA", "Northern Cardinal", "Flowering Dogwood"}, {"WASHINGTON", "Willow Goldfinch", "Coast Rhodedendron"}, {"WEST VIRGINIA", "Northern Cardinal", "Rhodedendrom"}, {"WISCONSIN", "American Robin", "Wood Violet"}, {"WYONMING", "Western Meadolark", "Indian Paintbrush"},};
//getter and setter methods for states public String[][] getState() { return state;
}
public void setState(String[][] state) { this.state = state; } public static int getStateIndex(String state, String[][] states) { for (int i = 0; i < states.length; i++) { if (state.trim().equalsIgnoreCase(states[i][0])) { return i; } } return -1; }
public static String getBird(int index, String[][] states) { return states[index][1]; }
public static String getFlower(int index, String[][] states) { return states[index][2]; }
}