Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. public class Flower
  2. {
  3.  
  4. private String name;
  5. private String color;
  6. private String genus;
  7. private String species;
  8.  
  9. public Flower(String theName, String theColor, String theGenus, String theSpecies)
  10. {
  11. name = theName;
  12. color = theColor;
  13. genus = theGenus;
  14. species = theSpecies;
  15. }
  16.  
  17. public String toString()
  18. {
  19. return color + " " + name + " (" + genus + " " + species + ")";
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement