Question: In Java Create the following 6 files Assignment6.java, flower.java, fungus.java, plant.java, weed.java, and herb.java Using recursion (no loops!) you must count the number of times

In Java

Create the following 6 files Assignment6.java, flower.java, fungus.java, plant.java, weed.java, and herb.java

Using recursion (no loops!) you must count the number of times a specific character, or set of characters appears in the name of each plant in your pack. We will call this 'analyzing' for the sake of future terminology. Examples are provided on the last page.

The following features are also required but should only be slightly changed from previous requirements.

You must have a graphical user interface implemented. This GUI MUST be unique but can be the same as you've previously used.

You must be able to display, add, remove, sort, filter, and now analyze information from our flower pack.

The flower pack should hold flowers, weeds, fungus, and herbs. All should be a subclass of a plant class.

Each subclass shares certain qualities (ID, Name, and Color) in plant class

Flower traits include (Thorns and Smell)

Fungus traits include (Poisonous)

Weed traits include (Poisonous, Edible and Medicinal)

Herb traits include (Flavor, Medicinal, Seasonal)

Analysis Examples

how you display the results is up to you

Analyze 3 different strings such as ar, ne, and um which strings is up to you and does not require user input

Analysis

"ar"

"ne"

"um"

"ll"

"r"

"u"

"dragon"

Name

Amaranthus

1

0

0

0

1

1

0

Anemone

0

2

0

0

0

0

0

Buplerum

0

0

1

0

1

2

0

Calla Lilly

0

0

0

2

0

0

0

Poinsettia

0

0

0

0

0

0

0

Ranunculus

0

0

0

0

0

3

0

Snapdragon

0

0

0

0

1

0

1

Analysis can be case sensitive, if you so desire. Remember - you MUST use recursion to solve this problem. Meaning not a single loop should be called when doing these calculations. You CAN use a loop when you want to move from analyzing one flower to the next, but your loop CANNOT be used when analyzing a specific flower.

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!