Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Let me see who can properly write this code IN NETBEANS JAVA Code: well written with instuctions The data file statedata. dat in the canvas

Let me see who can properly write this code

IN NETBEANS JAVA

Code: well written with instuctions

image text in transcribed

The data file statedata. dat in the canvas files for Week 1 is a plain text file containing three pieces of information for each state in the United States: the name of the state the state capital the population (as of July 2015) each item is on separate line in the file, such as Alabama Montgomery 4858979 Alaska Juneau 738432 Arizona Phoenix 6828065 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: 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. Your project's class (with the same name as the package) 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 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. 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. The NetBeans project city Project 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. Please ask me if you have any questions or run into any trouble. The data file statedata. dat in the canvas files for Week 1 is a plain text file containing three pieces of information for each state in the United States: the name of the state the state capital the population (as of July 2015) each item is on separate line in the file, such as Alabama Montgomery 4858979 Alaska Juneau 738432 Arizona Phoenix 6828065 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: 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. Your project's class (with the same name as the package) 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 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. 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. The NetBeans project city Project 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. Please ask me if you have any questions or run into any trouble

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

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions

Question

22. Explain superscalar, superpipelining, and VLIW architectures.

Answered: 1 week ago

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago