Code in Java 1. Create a class Flower with data: Name, Price, Color andproperly methods. 2. Create
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Posted Date: