Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
AppArranjo/build.xml
Builds, tests, and runs the project AppArranjo.
AppArranjo/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
AppArranjo/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 build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must set javac.includes
Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
Must select some files in the IDE or set javac.includes
To run this application from the command line without Ant, try:
java -cp "${run.classpath.with.dist.jar}" ${main.class}
To run this application from the command line without Ant, try:
java -jar "${dist.jar.resolved}"
Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
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
Must select one file in the IDE or set profile.class
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
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 applet.url
Must select one file in the IDE or set applet.url
AppArranjo/nbproject/genfiles.properties
build.xml.data.CRC32=58248a43
build.xml.script.CRC32=ae3e5fe5
build.xml.stylesheet.CRC32=28e38971@1.44.1.45
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# 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=58248a43
nbproject/build-impl.xml.script.CRC32=87e92e2b
nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408@1.44.1.45
AppArranjo/nbproject/private/private.properties
compile.on.save=true
user.properties.file=C:\\Users\\Renato\\.netbeans\\7.0\\build.properties
AppArranjo/nbproject/private/private.xml
file:/C:/teste/AppArranjo/src/apparranjo/AppArranjo.java
file:/C:/teste/AppArranjo/src/apparranjo/Arranjo.java
file:/C:/teste/AppArranjo/src/apparranjo/Menu.java
file:/C:/teste/AppArranjo/src/apparranjo/ES.java
AppArranjo/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}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/AppArranjo.jar
dist.javadoc.dir=${dist.dir}/javadoc
excludes=
includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
main.class=apparranjo.AppArranjo
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${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
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
AppArranjo/nbproject/project.xml
org.netbeans.modules.java.j2seproject
AppArranjo
AppArranjo/src/apparranjo/AppArranjo.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package apparranjo;
/**
*
* @author Renato
*/
public class AppArranjo {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Menu m = new Menu();
m.escolhaMenu();
}
}
AppArranjo/src/apparranjo/Arranjo.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package apparranjo;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author Renato
*/
public class Arranjo {
ArrayList <String> ar = new ArrayList<String>();
public void adicionar(String s)
{
ar.add(s);
}
public void exibir()
{
if(verificar())
{
System.out.println(" Lista Vazia ");
}
else
{
for(int i = 0; i<ar.size();i++)
{
System.out.println((i+1) +" - " + ar.get(i));
}
}
}
public void remover(int i )
{
ar.remove(i+1);
}
public void limpar()
{
ar.clear();
}
public int quantidade()
{
return ar.size();
}
public boolean verificar()
{
return ar.isEmpty();
}
public void alterar(int i,String s)
{
ar.add(i-1, s);
}
}
AppArranjo/src/apparranjo/ES.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package apparranjo;
import java.util.Scanner;
/**
*
* @author Renato
*/
public class ES {
Scanner s = new Scanner(System.in);
public int lerInteiro(String msg)
{
System.out.println(msg);
return s.nextInt();
}
public String lerTexto(String msg)
{
System.out.println(msg);
return s.nextLine();
}
public void exibir(String s)
{
System.out.println(s);
}
}
AppArranjo/src/apparranjo/Menu.java
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package apparranjo;
/**
*/
public class Menu {
ES e = new ES();
ES e2 = new ES();
Arranjo arranjo = new Arranjo();
public void exibirMenu()
{
e.exibir("\n 1) Cadastrar nomes \n 2) Exibir nomes \n 3) Limpar toda lista \n 4) Mostrar quantos elementos \n 5) Verificar se está vazio \n 6) Remover um \n 7)Alterar um elemento\n 8)Sair");
}
public void escolhaMenu()
{
int vc =0;
while(vc!=8)
{
exibirMenu();
vc=e.lerInteiro("digite sua escolha");
switch (vc)
{
case 1:
arranjo.adicionar(e2.lerTexto("Digite palavra"));
break;
case 2:
arranjo.exibir();
break;
case 3:
arranjo.limpar();
break;
case 4:
if(!arranjo.verificar())
{
e.exibir(" Quantidade de elementos "+arranjo.quantidade());
}
else
{
e.exibir("Lista está Vazia");
}
break;
case 5:
if(arranjo.verificar())
{
e.exibir("Lista Vazia");
}
else
{
e.exibir(" Existem "+ arranjo.quantidade() + " elementos" );
}
break;
case 6:
arranjo.remover(e.lerInteiro("Digite uma posição"));
break;
case 7:
arranjo.alterar(e.lerInteiro("Digite posição"), e2.lerTexto("Digite nova palavra"));
break;
case 8:
e.exibir("Apaboo");
break;
default:
e.exibir(" Não viaja, lê o menu , olha o cartaz ");
}
}
}
}