Question: Code in Java 1. Create a class Flower with data: Name, Price, Color andproperly methods. 2. Create another class named ListFlower. This class manages acollection
Code in Java
1. Create a class Flower with data: Name, Price, Color andproperly methods.
2. Create another class named ListFlower. This class manages acollection of Flower (may be LinkedList) named a. Implementing somemethods for ListFlower:
- Add: add new item of Flower to a
- Display: display all items of a
- sort(): sort as descending by Price and display all items ofa
- search(Flower f): check and return whether f is exists in a ornot.
- delete(int pos): remove the item at the position pos of a.
Write a program to use ListFlower as above menu.
Make your own main program to test all above methods.
Step by Step Solution
3.54 Rating (164 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
