Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

W is the line in with general equation 2x - 5y = 0 IR2

Answered: 1 week ago

Question

(2) Who knows about it in the company?

Answered: 1 week ago