Question: Write a flowerBouquet class in Java Write a Java class called flowerBouquet. This class has two fields, flowerName and flowerColor. It has a method whichFlower0

 Write a flowerBouquet class in Java Write a Java class called

Write a flowerBouquet class in Java Write a Java class called flowerBouquet. This class has two fields, flowerName and flowerColor. It has a method whichFlower0 which tells you the name and color of a flower. For example, if you create an object of this class with flowerName = "Lily" and flowerColor = "White", involving whichFlower will return a string that states "This flower is a white colored Lily". It has another method called sameFlower0 that tells you if a flower object is the same as another flower object. Two flower objects ate the same if both the flowerName and flowerColor for the objects is equal. In your main function, create a 'bouquet of flowers'. That is, create 2-3 objects of the flowerBouquet class. Call the whichFlower0 method on at least one flower. Call the sameFlower0 method for two cases, one where you have two similar flower objects and one where you have two distinct flower objects

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!