stateData/build.xml
Builds, tests, and runs the project stateData.
stateData/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
stateData/nbproject/build-impl.xml
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set bui.
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
stateDatabuild.xml Builds, tests, and runs the project.docx
1. stateData/build.xml
Builds, tests, and runs the project stateData.
stateData/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
stateData/nbproject/build-impl.xml
2.
3.
4.
5.
6.
7. Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
28. To run this application from the command line without
Ant, try:
java -jar "${dist.jar.resolved}"
29. Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
30. Must select one file in the IDE or set debug.class
Must select one file in the IDE or set debug.class
Must set fix.includes
This target only works when run from inside the NetBeans
IDE.
31. Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
This target only works when run from inside the NetBeans
IDE.
32. Must select one file in the IDE or set run.class
Must select some files in the IDE or set test.includes
33. Must select one file in the IDE or set run.class
Must select one file in the IDE or set applet.url
34.
35. Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
36. Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.class
Must select some method in the IDE or set test.method
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set test.class
Must select some method in the IDE or set test.method
37. Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
39. # Do not edit this file. You may delete it but then the IDE will
never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=c7b580eb
nbproject/build-impl.xml.script.CRC32=7013d572
nbproject/[email protected]
stateData/nbproject/project.properties
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processor.options=
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.
dir}/ap-source-output
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection
transport:
#debug.transport=dt_socket
debug.classpath=
${run.classpath}
debug.test.classpath=
${run.test.classpath}
# Files in build.classes.dir which should be excluded from
distribution jar
dist.archive.excludes=
# This directory is removed when the project is cleaned:
dist.dir=dist
41. ${javac.classpath}:
${build.classes.dir}
# Space-separated list of JVM arguments used when running the
project.
# You may also define separate properties like run-sys-
prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-
prop.name=value:
run.jvmargs=
run.test.classpath=
${javac.test.classpath}:
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
stateData/nbproject/project.xml
org.netbeans.modules.java.j2seproject
stateData
stateData/src/statedata/arrayClass.javastateData/src/statedata/arr
ayClass.javapackage statedata;
42. import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
publicclass arrayClass {
private stateClass[] myList;
privateint count;
publicvoid readData()throwsFileNotFoundException{
// set the array and size
myList =new stateClass[100];
// import text data
File stateData =newFile("statedata.txt");
// set up the scanner
Scanner kb =newScanner(stateData);
// create a while loop to store the data in array
while(kb.hasNextLine()){
myList[count]=new stateClass(kb);
count++;
}// end while
}// end readData()
}// arrayClass
stateData/src/statedata/stateClass.javastateData/src/statedata/sta
teClass.javapackage statedata;
import java.util.Scanner;
43. publicclass stateClass {
// declare the variables
privateString isState;// properiy of state name
privateString isCapital;// property of capital name
privateint isPopulation;// property of population
public stateClass(){
}
public stateClass(String state,String capital,int population)
{
isState = state;
isCapital = capital;
isPopulation = population;
}// end stateClass(String state, String capital, int population)
public stateClass(Scanner scanner)
{
isState = scanner.nextLine();
isCapital = scanner.nextLine();
isPopulation = scanner.nextInt();
scanner.nextLine();
}// stateClass(Scanner scanner)
publicString getState()
{
return isState;
}// end getState()
publicString getCapital()
{
return isCapital;
}// end getCapital()
45. import java.util.Scanner;
publicclass stateList {
publicstaticvoid main(String[] args)throwsFileNotFoundExcepti
on{
String state;// name of the states
// set up scanner
Scanner kb =newScanner(System.in);
// ask user to enter the name of the state
System.out.println("Please enter the name of the state: ");
state = kb.nextLine();
// call stateClass() method and pass
arrayClass array =new arrayClass();
array.readData();
}
}
stateData/statedata.txt
Alabama
Montgomery
4858979
Alaska
Juneau
738432