Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Flower
- {
- private String name;
- private String color;
- private String genus;
- private String species;
- public Flower(String theName, String theColor, String theGenus, String theSpecies)
- {
- name = theName;
- color = theColor;
- genus = theGenus;
- species = theSpecies;
- }
- public String toString()
- {
- return color + " " + name + " (" + genus + " " + species + ")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement