Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IN NETBEANS JAVA Code: well written with instuctions, well documented. Working c

ID: 3662855 • Letter: I

Question

IN NETBEANS JAVA Code: well written with instuctions, well documented. Working code plz

Must contain three seperate classes.

Read the file statedata.data(also tell me how to add the file to project)

This is the text file:

Alabama
Montgomery
4858979
Alaska
Juneau
738432
Arizona
Phoenix
6828065
Arkansas
Little Rock
2978204
California
Sacramento
39144818
Colorado
Denver
5456574
Connecticut
Hartford
3590886
Delaware
Dover
945934
Florida
Tallahassee
20271272
Georgia
Atlanta
10214860
Hawaii
Honolulu
1431603
Idaho
Boise
1654930
Illinois
Springfield
12859995
Indiana
Indianapolis
6619680
Iowa
Des Moines
3123899
Kansas
Topeka
2911641
Kentucky
Frankfort
4425092
Louisiana
Baton Rouge
4670724
Maine
Augusta
1329328
Maryland
Annapolis
6006401
Massachusetts
Boston
6794422
Michigan
Lansing
9922576
Minnesota
Saint Paul
5489594
Mississippi
Jackson
2992333
Missouri
Jefferson City
6083672
Montana
Helena
1032949
Nebraska
Lincoln
1896190
Nevada
Carson City
2890845
New Hampshire
Concord
1330608
New Jersey
Trenton
8958013
New Mexico
Santa Fe
2085109
New York
Albany
19795791
North Carolina
Raleigh
10042802
North Dakota
Bismarck
756927
Ohio
Columbus
11613423
Oklahoma
Oklahoma City
3911338
Oregon
Salem
4028977
Pennsylvania
Harrisburg
12802503
Rhode Island
Providence
1056298
South Carolina
Columbia
4896146
South Dakota
Pierre
858469
Tennessee
Nashville
6600299
Texas
Austin
27469114
Utah
Salt Lake City
2995919
Vermont
Montpelier
626042
Virginia
Richmond
8382993
Washington
Olympia
7170351
West Virginia
Charleston
1844128
Wisconsin
Madison
5771337
Wyoming
Cheyenne
586107

The data file statedata.dat in the canvas files for Week 1 Your project's class (with the same name as the package) is a plain text file containing three pieces of information for each state in the United States: should contain a main method, and methods to test your other classes as follows: . load the data from the data file into the array of o the name of the state . the state capital . the population (as of July 2015) states print the list of states including each state's name capital and population with the data for each state on a separate line a method that asks the user for the name of a state then either displays the data for that state, or says the state was not found in the list. each item is on separate line in the file, such as Alabama Montgomery 4858979 Alaska Juneau 738432 Arizona Phoenix 6828065 The main method should simply call the other methods in the class to show that they work. Each class should be in its own file, within the same package in the same NetBeans project. The end of Appendix B addresses how to do this and so on. Your task, after reading Appendix B- Software Flexibility, is to create a software package as a NetBeans project that contains three classes: The NetBeans project cityProject from CSCI 211, shows an example of this. In the project, you can see that each of the classes - City, Vertex, Edge, etc., is in its own file within the project. This is included as an example in the files for Week 1. Most of what's in the project is beyond the scope of this course, but it does show you how Java projects should contain separate classes in separate files within the same project. ans project that The NetBeans an executable class for the project itself . a class of states, with the properties name, capital, and population . a class for an array of state objects The state and array classes should contain appropriate properties and methods to work with those properties Please ask me if you have any questions or run into any trouble

Explanation / Answer

Can help You with this

public class State
{
private String stateName;
private int statePopulation;
private City capital;
private State.City population;
public State(String state, int statepop, String cap, int pop, String city, int citypop)
{
stateName = state;
this.statePopulation = statepop;
City capital = new City(city, citypop);
State.City population = new State.City(cap, pop);
}
public String getStateName()
{
return stateName;
}
public int getStatePopulation()
{
return statePopulation;
}
private class City
{
private String cityName;
private int cityPopulation;
public City(String city, int citypop)
{
cityName = city;
cityPopulation = citypop;
}
public void displayCity()
{
System.out.println("City Name: " + cityName);
System.out.println("City Population: " + cityPopulation);
}
}
}