Baixe o app para aproveitar ainda mais
Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original
Holerite/build.xml Builds, tests, and runs the project Holerite. Holerite/manifest.mf Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build Holerite/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 No tests executed. 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 -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 This target only works when run from inside the NetBeans IDE. 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. Must select one file in the IDE or set run.class Must select some files in the IDE or set test.includes Must select one file in the IDE or set run.class Must select one file in the IDE or set applet.url 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 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 Must select one file in the IDE or set applet.url Must select one file in the IDE or set applet.url Holerite/nbproject/genfiles.properties build.xml.data.CRC32=268d6269 build.xml.script.CRC32=b8909fdf build.xml.stylesheet.CRC32=8064a381@1.80.1.48 # 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=268d6269 nbproject/build-impl.xml.script.CRC32=88afc7f1 nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 Holerite/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} # Os arquivos em build.classes.dir que devem ser exclu\u00eddos do jar de distribui\u00e7\u00e3o dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/Holerite.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.external.vm=true javac.processorpath=\ ${javac.classpath} javac.source=1.8 javac.target=1.8 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=holerite.Holerite 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. # 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 Holerite/nbproject/project.xml org.netbeans.modules.java.j2seproject Holerite Holerite/src/holerite/Funcionario.java package holerite; public class Funcionario { double salario ; byte anosDeEmpresa; public Funcionario(double salario, byte anosDeEmpresa) { this.salario = salario; this.anosDeEmpresa = anosDeEmpresa; } public Funcionario() { } public double getSalario() { return salario; } public void setSalario(double salario) { this.salario = salario; } public byte getAnosDeEmpresa() { return anosDeEmpresa; } public void setAnosDeEmpresa(byte anosDeEmpresa) { this.anosDeEmpresa = anosDeEmpresa; } public double descInss (){ double valorDesc=0; if(this.salario <= 1659.38 ){ valorDesc = this.salario * 0.08; } if(this.salario > 1659.38 && this.salario<= 2765.66){ valorDesc = this.salario * 0.09; } if(this.salario > 2765.66 && this.salario<= 5531.31){ valorDesc = this.salario * 0.11; } if(this.salario > 5531.31){ valorDesc = 608.44; } return valorDesc; } public double deposFgts(){ double valorDepos= this.salario * 0.08; return valorDepos; } public double descIr(){ //O Desconto do IR acontece após o desconto do INSS ./ double valorDescAposInss = 0; valorDescAposInss=this.salario - descInss(); double valorDesc=0; if(valorDescAposInss > 1903.99 && valorDescAposInss<= 2826.65 ){ valorDesc = valorDescAposInss * 0.075; } if(valorDescAposInss > 2826.66 && valorDescAposInss<= 3751.05){ valorDesc = valorDescAposInss * 0.15; } if(valorDescAposInss > 3751.05 && valorDescAposInss<= 4664.68){ valorDesc = valorDescAposInss * 0.225; } if(valorDescAposInss > 4664.68){ valorDesc =valorDescAposInss * 0.275; } return valorDesc; } public double descValeTransp(){ double valorDesc = this.salario * 0.06; return valorDesc; } public double bonificacao(){ double valorBonificacao = 0; if (this.anosDeEmpresa > 2 && this.anosDeEmpresa <4){ valorBonificacao= 200.00; } if (this.anosDeEmpresa > 4 ){ valorBonificacao= 400; } return valorBonificacao; } public void calcularSalarioLiquido(){ //valor do salario bruto . System.out.println("Acrecimos : "); System.out.println("Valor do salario Bruto(+) : " + this.salario); //execução dos metodos para calcular o valor DO DESCONTO . double valorBonificacao =bonificacao(); this.salario += bonificacao(); double valorInss = descInss(); double valorIr = descIr(); double valorValeTransp = descValeTransp(); //exibir o valor do desconto System.out.println("Valor da bonificação(+) : " + valorBonificacao); System.out.println(" ------------"); System.out.println(" : " + this.salario ); System.out.println("Descontos : "); System.out.println("Valor desconado INSS(-) : " + valorInss); System.out.println("Valor descontado IR(-) : " + valorIr ); System.out.println("Valor descontado do VT(-) : " + valorValeTransp); //DESCONTAR this.salario -= valorInss; this.salario -= valorIr; this.salario -= valorValeTransp; System.out.println(" -----------"); System.out.println(" " + this.salario); System.out.println("Informativos : "); System.out.println("Valor Liquido a receber : " + this.salario); System.out.println("Valor do depósito FGTS(n) : " + deposFgts() ); } } Holerite/src/holerite/Holerite.java package holerite; import java.util.Scanner; public class Holerite { public static void main(String[] args) { Scanner scn = new Scanner (System.in); Funcionario func = new Funcionario(); System.out.println("Digite o valor de seu salario bruto :"); func.setSalario(scn.nextDouble()); System.out.println("Digite seu tempo de casa na empresa MarcSolution :"); func.setAnosDeEmpresa(scn.nextByte()); func.calcularSalarioLiquido(); } }
Compartilhar