Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ program that will take an input file of hurricane information named FloridaHurricanes.txt and sort the information by hurricane name. The input file should be

C++ program that will take an input file of hurricane information namedFloridaHurricanes.txtand sort the information by hurricane name.

The input file should be located in the current directory of the project.A sample file has been given to you to test your project and it can be found in the Canvas module for this project.

The input file format is:hurricane name followed by category.An example:Alma 2

The input file contains 38 hurricanes' information.Read the hurricane names into a string array within the class.Read the storm category into an integer array.

Sort the string array and integer array using either the bubble sort method or selection sort method found in this chapter of the textbook in ascending order.

Display the list of hurricanes sorted by hurricane names. (See example below)

The class should use appropriate private member variables and methods.

An example:

If the input contained the following:

Elena 3

Kate 2

Floyd 1

Andrew 5

The output would be:

Florida Major Hurricanes

Sorted by hurricane name:

NameCategory

Andrew5

Elena3

Floyd1

Kate2

End of results

Hurricane.txt

Easy 3

King 4

Florence 1

Hazel 1

Flossy 1

Donna 4

Cleo 2

Dora 2

Isbell 2

Betsy 3

Alma 2

Inez 1

Gladys 2

Agnes 1

Eloise 3

David 2

Elena 3

Kate 2

Floyd 1

Andrew 5

Erin 2

Opal 3

Earl 1

Georges 2

Irene 1

Charley 4

Frances 2

Ivan 3

Jeanne 3

Dennis 3

Katrina 1

Rita 1

Wilma 3

Hermine 1

Matthew 2

Irma 4

Michael 5

Sally 2

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions