From a643e625935fa5e74476acc45ef6657a881024c4 Mon Sep 17 00:00:00 2001 From: ArturWeber <88106656+ArturWeber@users.noreply.github.com> Date: Fri, 30 Sep 2022 01:00:24 -0300 Subject: [PATCH 1/2] Feito exercicio 1, faltam inumeros toques e aprofundamentos --- .DS_Store | Bin 8196 -> 8196 bytes .gitignore | 4 +- lista02/.DS_Store | Bin 6148 -> 6148 bytes lista02/ex02/.DS_Store | Bin 6148 -> 6148 bytes lista03/.DS_Store | Bin 0 -> 6148 bytes lista03/ex01/ex01/build.xml | 73 + lista03/ex01/ex01/manifest.mf | 3 + lista03/ex01/ex01/nbproject/build-impl.xml | 1771 +++++++++++++++++ .../ex01/ex01/nbproject/genfiles.properties | 8 + .../ex01/ex01/nbproject/project.properties | 95 + lista03/ex01/ex01/nbproject/project.xml | 15 + lista03/ex01/ex01/src/ex01/Automovel.java | 26 + lista03/ex01/ex01/src/ex01/Bicicleta.java | 25 + lista03/ex01/ex01/src/ex01/Ex01.java | 20 + lista03/ex01/ex01/src/ex01/Oficina.java | 33 + lista03/ex01/ex01/src/ex01/Test.java | 12 + lista03/ex01/ex01/src/ex01/Veiculo.java | 22 + 17 files changed, 2106 insertions(+), 1 deletion(-) create mode 100644 lista03/.DS_Store create mode 100644 lista03/ex01/ex01/build.xml create mode 100644 lista03/ex01/ex01/manifest.mf create mode 100644 lista03/ex01/ex01/nbproject/build-impl.xml create mode 100644 lista03/ex01/ex01/nbproject/genfiles.properties create mode 100644 lista03/ex01/ex01/nbproject/project.properties create mode 100644 lista03/ex01/ex01/nbproject/project.xml create mode 100644 lista03/ex01/ex01/src/ex01/Automovel.java create mode 100644 lista03/ex01/ex01/src/ex01/Bicicleta.java create mode 100644 lista03/ex01/ex01/src/ex01/Ex01.java create mode 100644 lista03/ex01/ex01/src/ex01/Oficina.java create mode 100644 lista03/ex01/ex01/src/ex01/Test.java create mode 100644 lista03/ex01/ex01/src/ex01/Veiculo.java diff --git a/.DS_Store b/.DS_Store index 13647a38b118eaf74e66e2491f4aa4f991267f56..f08e3a6436b7403481a30c6832f0428fcb059304 100644 GIT binary patch delta 416 zcmZp1XmOa}&&aniU^hP_-(((vO2+MzqlF9A#H*`~40IHXEKO>46sj%FfNWD!)7n~2 z4pC)&>!A4ToZP(p&dKtE@{C=Z?FFTo$j~=gSVWPZogs%IlcAWQgdvf^fWdfjwTS#= z2Vp*5 delta 153 zcmZp1XmOa}&&ahgU^hP_*JK`nO2(a&t3(PlB&(|p%`9{j3@r?5brh-%jm(X76wFL4 zYHK+;M3wcegW|Jua`W=LCku+oGxlt@6_jRT+yT<5E>T@=WN4|QU}R_k(rIA{G{w}& l08L{TSY!8O0TIQ?4Wj9jm&inJtPp12%r5bbWn%?9GXUwEE0h2L diff --git a/.gitignore b/.gitignore index eabe0b6..44c84f2 100644 --- a/.gitignore +++ b/.gitignore @@ -32,4 +32,6 @@ hs_err_pid* /lista02/ex02/ex02-Netbeans/dist/ /lista02/ex02/ex02-Netbeans/build/ /lista02/ex02/ex02-Netbeans/nbproject/private/ -/lista02/lista02-ex03/target/ \ No newline at end of file +/lista02/lista02-ex03/target/ +/lista02/ex02/ex01/nbproject/private/ +/lista03/ex01/ex01/nbproject/private/ diff --git a/lista02/.DS_Store b/lista02/.DS_Store index c62ecb84d8794563428259d0ead2eb453d4ed95d..7e4573ead4767dab9caa4f21d2ee4b6666734c8c 100644 GIT binary patch delta 31 mcmZoMXffDukV(iuN5RO#vQ|f-+R(tvSVzIsZ1ZI%Ls0;d1PGu2 delta 31 mcmZoMXffDukV(kUQb)na(4tmHq1wXILPx>WX!B(zLs0;dT?nlJ diff --git a/lista02/ex02/.DS_Store b/lista02/ex02/.DS_Store index dc45196fda325f0ce346add957d11c26aae7ade2..46862b8afa9f94aab91823f6cf61ae5713153fd4 100644 GIT binary patch delta 100 zcmZoMXfc@JFUrKgz`)4BAi%(&%izb5%22|P#E?4iqWWY55f*b^pg;wK0fP~;Bts%Y m9z(HbPJVJyPJR+lJ5Vp9ERfdw4+abj8+#ntH?wp6jc`)<6nfKl#@0&1_M?|7GjXOjwB686f8%=b-5w>$XCk->h zM!{m~%zi3wGW}m-Ad76|}yZv1> zwwz0sx7}@b$9)@|$XQT@)wJw|#cLkDkTQ*ydKkS-MzcZd>SLKzVUmps6_CUuxV(9l zWU-v}(((7WC4V$pQ3-MsVQ`QUvz$>b-^ zyufFv2LpjNp#?!Wm?DtKouJiRMd{};av~G|8XwOeJul*q?vQ%cr zSdZWH79CMSB~=vCUAj$Au`LDkjE3l+k)#y%39z8C@?`xG_DXq<;WdP|M>)kbKC_wp z)_bQm6GJPO0n5O}WxyPc?#{)fz-De4uncTqfX@dHjnOw)Yg9)EI#mJy9ZV~Mu73T2 z9!~&$gSAG?K!gqj>QG@y3}GqQ) + + + + + + + + + + Builds, tests, and runs the project ex01. + + + diff --git a/lista03/ex01/ex01/manifest.mf b/lista03/ex01/ex01/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/lista03/ex01/ex01/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/lista03/ex01/ex01/nbproject/build-impl.xml b/lista03/ex01/ex01/nbproject/build-impl.xml new file mode 100644 index 0000000..777da34 --- /dev/null +++ b/lista03/ex01/ex01/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lista03/ex01/ex01/nbproject/genfiles.properties b/lista03/ex01/ex01/nbproject/genfiles.properties new file mode 100644 index 0000000..549a49b --- /dev/null +++ b/lista03/ex01/ex01/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=c5f64278 +build.xml.script.CRC32=5d7510be +build.xml.stylesheet.CRC32=f85dc8f2@1.103.0.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=c5f64278 +nbproject/build-impl.xml.script.CRC32=544fa240 +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.103.0.48 diff --git a/lista03/ex01/ex01/nbproject/project.properties b/lista03/ex01/ex01/nbproject/project.properties new file mode 100644 index 0000000..51c0dcf --- /dev/null +++ b/lista03/ex01/ex01/nbproject/project.properties @@ -0,0 +1,95 @@ +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.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# 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 +dist.jar=${dist.dir}/ex01.jar +dist.javadoc.dir=${dist.dir}/javadoc +dist.jlink.dir=${dist.dir}/jlink +dist.jlink.output=${dist.jlink.dir}/ex01 +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# The jlink additional root modules to resolve +jlink.additionalmodules= +# The jlink additional command line parameters +jlink.additionalparam= +jlink.launcher=true +jlink.launcher.name=ex01 +main.class=ex01.Ex01 +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.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/lista03/ex01/ex01/nbproject/project.xml b/lista03/ex01/ex01/nbproject/project.xml new file mode 100644 index 0000000..837872d --- /dev/null +++ b/lista03/ex01/ex01/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + ex01 + + + + + + + + + diff --git a/lista03/ex01/ex01/src/ex01/Automovel.java b/lista03/ex01/ex01/src/ex01/Automovel.java new file mode 100644 index 0000000..f7592fd --- /dev/null +++ b/lista03/ex01/ex01/src/ex01/Automovel.java @@ -0,0 +1,26 @@ +package ex01; + +public class Automovel extends Veiculo { + protected String placa; + + Automovel (float precoAutomovel, String modeloAutomovel, String marcaAutomovel, String corAutomovel, String placaAutomovel) { + super(precoAutomovel, modeloAutomovel, marcaAutomovel, corAutomovel); + placa = placaAutomovel; + } + + void listarVerificacoes() { + System.out.println("Verificacoes"); + } + + void ajustar() { + System.out.println("Ajustado"); + } + + void limpar() { + System.out.println("Limpado"); + } + + void trocarOleo() { + System.out.println("oleo trocado"); + } +} diff --git a/lista03/ex01/ex01/src/ex01/Bicicleta.java b/lista03/ex01/ex01/src/ex01/Bicicleta.java new file mode 100644 index 0000000..f2cad75 --- /dev/null +++ b/lista03/ex01/ex01/src/ex01/Bicicleta.java @@ -0,0 +1,25 @@ +package ex01; + +public class Bicicleta extends Veiculo { + protected int numMarchas; + protected int aroRoda; + + + Bicicleta (float precoBicicleta, String modeloBicicleta, String marcaBicicleta, String corBicicleta, int numMarchasBicicleta, int aroRodasBicicleta){ + super(precoBicicleta, modeloBicicleta, marcaBicicleta, corBicicleta); + numMarchas = numMarchasBicicleta; + aroRoda = aroRodasBicicleta; + } + + void listarVerificacoes() { + System.out.println("Verificacoes");; + } + + void ajustar() { + System.out.println("Ajustado");; + } + + void limpar() { + System.out.println("Limpado");; + } +} diff --git a/lista03/ex01/ex01/src/ex01/Ex01.java b/lista03/ex01/ex01/src/ex01/Ex01.java new file mode 100644 index 0000000..17fad99 --- /dev/null +++ b/lista03/ex01/ex01/src/ex01/Ex01.java @@ -0,0 +1,20 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template + */ +package ex01; + +/** + * + * @author arturbrennerweber + */ +public class Ex01 { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +} diff --git a/lista03/ex01/ex01/src/ex01/Oficina.java b/lista03/ex01/ex01/src/ex01/Oficina.java new file mode 100644 index 0000000..fc2544c --- /dev/null +++ b/lista03/ex01/ex01/src/ex01/Oficina.java @@ -0,0 +1,33 @@ +package ex01; + +import java.util.ArrayList; + +public class Oficina extends ArrayList{ + + private ArrayList veiculos; + private int proximo = -1; + + Oficina (){ + veiculos = new ArrayList(); + veiculos.add(new Bicicleta(1000, "Caloi 10", "Caloi", "Dourada", 21, 700)); + veiculos.add(new Automovel(50000, "Kwid", "Renault", "Branco", "AUB-5A92")); + } + + public Veiculo proximo() { + proximo++; + return veiculos.get(proximo); + } + + public void manutencao(Veiculo v) { + v.listarVerificacoes(); + v.ajustar(); + v.limpar(); + + if(v instanceof Automovel){ + ((Automovel)v).trocarOleo(); + } + } + + + +} diff --git a/lista03/ex01/ex01/src/ex01/Test.java b/lista03/ex01/ex01/src/ex01/Test.java new file mode 100644 index 0000000..5804edd --- /dev/null +++ b/lista03/ex01/ex01/src/ex01/Test.java @@ -0,0 +1,12 @@ +package ex01; + +class Test{ + public static void main(String args[]){ + Oficina o = new Oficina(); + Veiculo v; + for(int i = 0;i < 4; ++i){ + v = o.proximo(); + o.manutencao(v); + } + } +} \ No newline at end of file diff --git a/lista03/ex01/ex01/src/ex01/Veiculo.java b/lista03/ex01/ex01/src/ex01/Veiculo.java new file mode 100644 index 0000000..5cb7304 --- /dev/null +++ b/lista03/ex01/ex01/src/ex01/Veiculo.java @@ -0,0 +1,22 @@ +package ex01; + +public abstract class Veiculo { + + protected float preco; + protected String modelo; + protected String marca; + protected String cor; + + + Veiculo (float precoVeiculo, String modeloVeiculo, String marcaVeiculo, String corVeiculo) { + preco = precoVeiculo; + modelo = modeloVeiculo; + marca = marcaVeiculo; + cor = corVeiculo; + } + + + abstract void listarVerificacoes(); + abstract void ajustar(); + abstract void limpar(); +} From 538a8ca01895be4a17c272cdc8bb66f1ab16589a Mon Sep 17 00:00:00 2001 From: ArturWeber <88106656+ArturWeber@users.noreply.github.com> Date: Sun, 2 Oct 2022 19:47:59 -0300 Subject: [PATCH 2/2] corrigidas sugestoes coveiro --- .DS_Store | Bin 8196 -> 8196 bytes lista03/.DS_Store | Bin 6148 -> 6148 bytes lista03/ex01/{ex01 => }/build.xml | 0 lista03/ex01/ex01/src/ex01/Ex01.java | 20 ------------------ lista03/ex01/ex01/src/ex01/Test.java | 12 ----------- lista03/ex01/{ex01 => }/manifest.mf | 0 .../ex01/{ex01 => }/nbproject/build-impl.xml | 0 .../{ex01 => }/nbproject/genfiles.properties | 0 .../ex01/nbproject/private/private.properties | 2 ++ lista03/ex01/nbproject/private/private.xml | 13 ++++++++++++ .../{ex01 => }/nbproject/project.properties | 0 lista03/ex01/{ex01 => }/nbproject/project.xml | 0 .../ex01/{ex01 => }/src/ex01/Automovel.java | 0 .../ex01/{ex01 => }/src/ex01/Bicicleta.java | 10 ++++----- lista03/ex01/{ex01 => }/src/ex01/Oficina.java | 0 lista03/ex01/{ex01 => }/src/ex01/Veiculo.java | 16 +++++++------- lista03/ex01/src/ex01/ex01.java | 12 +++++++++++ 17 files changed, 40 insertions(+), 45 deletions(-) rename lista03/ex01/{ex01 => }/build.xml (100%) delete mode 100644 lista03/ex01/ex01/src/ex01/Ex01.java delete mode 100644 lista03/ex01/ex01/src/ex01/Test.java rename lista03/ex01/{ex01 => }/manifest.mf (100%) rename lista03/ex01/{ex01 => }/nbproject/build-impl.xml (100%) rename lista03/ex01/{ex01 => }/nbproject/genfiles.properties (100%) create mode 100644 lista03/ex01/nbproject/private/private.properties create mode 100644 lista03/ex01/nbproject/private/private.xml rename lista03/ex01/{ex01 => }/nbproject/project.properties (100%) rename lista03/ex01/{ex01 => }/nbproject/project.xml (100%) rename lista03/ex01/{ex01 => }/src/ex01/Automovel.java (100%) rename lista03/ex01/{ex01 => }/src/ex01/Bicicleta.java (74%) rename lista03/ex01/{ex01 => }/src/ex01/Oficina.java (100%) rename lista03/ex01/{ex01 => }/src/ex01/Veiculo.java (54%) create mode 100644 lista03/ex01/src/ex01/ex01.java diff --git a/.DS_Store b/.DS_Store index f08e3a6436b7403481a30c6832f0428fcb059304..8be5a50a885e210d364d7395e901bca7b979bcbb 100644 GIT binary patch delta 32 mcmZp1XmOa}&&azmU^hP_?`9r>Wvm;^LYX$RORNSmf|vlUU=LW-Dv@IX0Dp%RLI3~& diff --git a/lista03/.DS_Store b/lista03/.DS_Store index 1e8e5a88121074b75b69769a0ebbadefc6bac7d2..140d08f95515170733da48a4aad57cea1aa2c40d 100644 GIT binary patch delta 50 zcmZoMXfc@J&&aYdU^gQp%VZuVDL%$<1_lPr|4=a5gz5I?cIF0_i47H-**X650|3c0 B6b%3X delta 175 zcmZoMXfc@J&&aVcU^gQp$7CKRDL#hl3=9m0|G|KPVX_I+?fRT_!{Frn+ybBk46rby zGE^`aFc{|MySOCf + + + + + file:/Users/arturbrennerweber/Desktop/4º%20Período/Programação%20Orientada%20a%20Objetos%20-%20SCC0604/SCC0604-POO-2022.2/lista03/ex01/ex01/src/ex01/Automovel.java + file:/Users/arturbrennerweber/Desktop/4º%20Período/Programação%20Orientada%20a%20Objetos%20-%20SCC0604/SCC0604-POO-2022.2/lista03/ex01/ex01/src/ex01/Test.java + file:/Users/arturbrennerweber/Desktop/4º%20Período/Programação%20Orientada%20a%20Objetos%20-%20SCC0604/SCC0604-POO-2022.2/lista03/ex01/ex01/src/ex01/Oficina.java + file:/Users/arturbrennerweber/Desktop/4º%20Período/Programação%20Orientada%20a%20Objetos%20-%20SCC0604/SCC0604-POO-2022.2/lista03/ex01/ex01/src/ex01/Veiculo.java + file:/Users/arturbrennerweber/Desktop/4º%20Período/Programação%20Orientada%20a%20Objetos%20-%20SCC0604/SCC0604-POO-2022.2/lista03/ex01/ex01/src/ex01/Bicicleta.java + + + diff --git a/lista03/ex01/ex01/nbproject/project.properties b/lista03/ex01/nbproject/project.properties similarity index 100% rename from lista03/ex01/ex01/nbproject/project.properties rename to lista03/ex01/nbproject/project.properties diff --git a/lista03/ex01/ex01/nbproject/project.xml b/lista03/ex01/nbproject/project.xml similarity index 100% rename from lista03/ex01/ex01/nbproject/project.xml rename to lista03/ex01/nbproject/project.xml diff --git a/lista03/ex01/ex01/src/ex01/Automovel.java b/lista03/ex01/src/ex01/Automovel.java similarity index 100% rename from lista03/ex01/ex01/src/ex01/Automovel.java rename to lista03/ex01/src/ex01/Automovel.java diff --git a/lista03/ex01/ex01/src/ex01/Bicicleta.java b/lista03/ex01/src/ex01/Bicicleta.java similarity index 74% rename from lista03/ex01/ex01/src/ex01/Bicicleta.java rename to lista03/ex01/src/ex01/Bicicleta.java index f2cad75..8835064 100644 --- a/lista03/ex01/ex01/src/ex01/Bicicleta.java +++ b/lista03/ex01/src/ex01/Bicicleta.java @@ -1,14 +1,14 @@ package ex01; public class Bicicleta extends Veiculo { - protected int numMarchas; - protected int aroRoda; + private int numMarchas; + private int aroRoda; Bicicleta (float precoBicicleta, String modeloBicicleta, String marcaBicicleta, String corBicicleta, int numMarchasBicicleta, int aroRodasBicicleta){ super(precoBicicleta, modeloBicicleta, marcaBicicleta, corBicicleta); - numMarchas = numMarchasBicicleta; - aroRoda = aroRodasBicicleta; + this.numMarchas = numMarchasBicicleta; + this.aroRoda = aroRodasBicicleta; } void listarVerificacoes() { @@ -20,6 +20,6 @@ void ajustar() { } void limpar() { - System.out.println("Limpado");; + System.out.println("Limpo");; } } diff --git a/lista03/ex01/ex01/src/ex01/Oficina.java b/lista03/ex01/src/ex01/Oficina.java similarity index 100% rename from lista03/ex01/ex01/src/ex01/Oficina.java rename to lista03/ex01/src/ex01/Oficina.java diff --git a/lista03/ex01/ex01/src/ex01/Veiculo.java b/lista03/ex01/src/ex01/Veiculo.java similarity index 54% rename from lista03/ex01/ex01/src/ex01/Veiculo.java rename to lista03/ex01/src/ex01/Veiculo.java index 5cb7304..557daee 100644 --- a/lista03/ex01/ex01/src/ex01/Veiculo.java +++ b/lista03/ex01/src/ex01/Veiculo.java @@ -2,17 +2,17 @@ public abstract class Veiculo { - protected float preco; - protected String modelo; - protected String marca; - protected String cor; + private float preco; + private String modelo; + private String marca; + private String cor; Veiculo (float precoVeiculo, String modeloVeiculo, String marcaVeiculo, String corVeiculo) { - preco = precoVeiculo; - modelo = modeloVeiculo; - marca = marcaVeiculo; - cor = corVeiculo; + this.preco = precoVeiculo; + this.modelo = modeloVeiculo; + this.marca = marcaVeiculo; + this.cor = corVeiculo; } diff --git a/lista03/ex01/src/ex01/ex01.java b/lista03/ex01/src/ex01/ex01.java new file mode 100644 index 0000000..b7b3088 --- /dev/null +++ b/lista03/ex01/src/ex01/ex01.java @@ -0,0 +1,12 @@ +package ex01; + +class ex01{ + public static void main(String[] args){ + Oficina o = new Oficina(); + Veiculo v; + for(int i = 0; i < 4; ++i){ + v = o.proximo(); + o.manutencao(v); + } + } +} \ No newline at end of file