Question: Hi, I need help with this project: Using JAVA language Requirements: 1. Create a class named State that will store information about a US state

Hi,

I need help with this project:

Using JAVA language

Requirements: 1. Create a class named State that will store information about a US state and provide methods to get, and set the data, and compare the states by several fields. a. Fields: State Name, Capital City, State Abbreviation, State Population, Region, US House Seats b. Constructor c. Get and set methods for each field d. Compare method to compare based on State Name (expects a State object as a parameter) e. Method to print a state

2. Create a class named Project1 that will: a. Read the file (csv) of states and create an array of state objects containing that data. b. Offer the user the following options: 1) Print a state report 2) Sort by state name (using Bubble sort) 3) Sort by population (using Selection sort) 4) Sort by Region (using Insertion sort) 5) Find and print a given state (using binary search if the data is sorted by state name, sequential search if not) 6) Quit c. Implement the given option, then prompt again. (deal with invalid choice) Project1 should have main and methods for each options 1-5. d. The State report in option 1 should be in this form:

State Name Capital City State Abbr State Population Region US House Seats ------------------------------------------------------------------------------------------ Florida Tallahassee FL 19,552,860 South 27 Pennsylvania Harrisburg PA 12,773,801 Middle Atlantic 18 Massachusetts Boston MA 6,692,824 New England 9 e. The State report in option 5 should be in this form: State Name: Florida Capital City: Tallahassee State Abbr: FL State Population: 19,552,860 Region: South US House Seats: 27 Provide comments in this form for the State class:

Please provide comments to explain

Thank you

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!