Find Us On: Facebook Twitter Rss Feed Blog
Need To Register? Sign Up Login

plant nursery

davidinusa
davidinusa 


Create a class Plant for a Plant Nursery that has five attributes related to plants: Maximum Height in feet Common name Scientific name Price Whether or not it is fragile. Create two methods of your own choosing for the class Plant. Allow the user to create a Plant object from the console. After the plant object is created display the information back to the user using a toString method. Attachments
Tags Clarifications

Answers

Plant - Java Source

dickersonka
dickersonka 



Attached is the source with comments in java for the plant nursery Attachments
Plant.zip (41 K) Download
Preview

Preview
public class Plant { private double maximumHeight; private String commonName; private String scientificName; private double price; private boolean fragile; private boolean hasFlowers; private boolean isAnnual; /** * Create Plant */ public Plant(){ } /**

Preview
= new Plant(); //prompt for plant properties System.out.println("Create a plant"); //height System.out.print("Enter Maximum Height: "); plant.setMaximumHeight(Double.parseDouble(input.nextLine())); //common name System.out.print("Enter Common Name: "); plant.setCommonName(input.nextLine()); //scientific name System.out.print("Enter

Screenshots
Screenshot
Purchase Answer