<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wagner Barongello</title>
	<atom:link href="http://wagner.hacknroll.com/faculdade/feed/" rel="self" type="application/rss+xml" />
	<link>http://wagner.hacknroll.com/faculdade</link>
	<description>Ciências da Computação</description>
	<lastBuildDate>Fri, 12 Mar 2010 23:57:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Atividade 3 &#8211; 11/03/2010</title>
		<link>http://wagner.hacknroll.com/faculdade/2010/03/atividade-3-11032010/</link>
		<comments>http://wagner.hacknroll.com/faculdade/2010/03/atividade-3-11032010/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 23:57:32 +0000</pubDate>
		<dc:creator>Wagner Barongello</dc:creator>
				<category><![CDATA[Paradigmas de Programação]]></category>
		<category><![CDATA[Aparecido]]></category>
		<category><![CDATA[Atividade]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://wagner.hacknroll.com/faculdade/?p=71</guid>
		<description><![CDATA[Atividade 3 de Paradigmas de Programação de 11/03/2010.

Esfera.java
package Atividade_3;

public class Esfera &#123;
&#160; &#160; static double PI = 3.14;
&#160; &#160; static int Contador = 0;
&#160; &#160; public double Raio, xCentro, yCentro;
&#160; &#160; 
&#160; &#160; public Esfera&#40;double r, double x, double y&#41; &#123;
&#160; &#160; &#160; &#160; Raio = r;
&#160; &#160; &#160; &#160; xCentro = x;
&#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Atividade 3 de Paradigmas de Programação de 11/03/2010.</p>
<p><span id="more-71"></span></p>
<p><strong>Esfera.java</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;height:300px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">Atividade_3</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Esfera <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">double</span> PI <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3.14</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> Contador <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> Raio, xCentro, yCentro<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Esfera<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> r, <span style="color: #000066; font-weight: bold;">double</span> x, <span style="color: #000066; font-weight: bold;">double</span> y<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Raio <span style="color: #339933;">=</span> r<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; xCentro <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; yCentro <span style="color: #339933;">=</span> y<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Contador<span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Esfera<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Raio <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10.0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; xCentro <span style="color: #339933;">=</span> yCentro <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1.0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Contador<span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Esfera<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> x, <span style="color: #000066; font-weight: bold;">double</span> y<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Raio <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5.0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; xCentro <span style="color: #339933;">=</span> x<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; yCentro <span style="color: #339933;">=</span> y<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Contador<span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> Volume<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>4.0 <span style="color: #339933;">*</span> PI <span style="color: #339933;">*</span> Raio <span style="color: #339933;">*</span> Raio <span style="color: #339933;">*</span> Raio<span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">3.0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Test_Esfera.java</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">Atividade_3</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Test_Esfera <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Esfera Esfera1 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Esfera<span style="color: #009900;">&#40;</span>7.0, 3.0, 5.0<span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Esfera2 <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Esfera<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Volume esfera 1: &quot;</span> <span style="color: #339933;">+</span> Esfera1.<span style="color: #006633;">Volume</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">&quot;Volume esfera 2: &quot;</span> <span style="color: #339933;">+</span> Esfera2.<span style="color: #006633;">Volume</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">&quot;Objetos criados: &quot;</span> <span style="color: #339933;">+</span> Esfera.<span style="color: #006633;">Contador</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Ponto.java</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;height:300px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">Atividade_3</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Ponto <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> x, y<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Ponto<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> xInicial, <span style="color: #000066; font-weight: bold;">double</span> yInicial<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; x <span style="color: #339933;">=</span> xInicial<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; y <span style="color: #339933;">=</span> yInicial<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Ponto<span style="color: #009900;">&#40;</span>Ponto p<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; x <span style="color: #339933;">=</span> p.<span style="color: #006633;">x</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; y <span style="color: #339933;">=</span> p.<span style="color: #006633;">y</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> moverPonto<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> xMover, <span style="color: #000066; font-weight: bold;">double</span> yMover<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; x <span style="color: #339933;">+=</span> xMover<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; y <span style="color: #339933;">+=</span> yMover<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> distanciaAte<span style="color: #009900;">&#40;</span>Ponto p<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">sqrt</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">abs</span><span style="color: #009900;">&#40;</span>p.<span style="color: #006633;">x</span> <span style="color: #339933;">-</span> x<span style="color: #009900;">&#41;</span>, 2<span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">pow</span><span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Amath+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Math</span></a>.<span style="color: #006633;">abs</span><span style="color: #009900;">&#40;</span>p.<span style="color: #006633;">y</span> <span style="color: #339933;">-</span> y<span style="color: #009900;">&#41;</span>, 2<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Test_Ponto.java</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">Atividade_3</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Test_Ponto <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Ponto A <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Ponto<span style="color: #009900;">&#40;</span>2.0, 2.0<span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; B <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Ponto<span style="color: #009900;">&#40;</span>3.0, 3.0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Distância entre A e B: &quot;</span> <span style="color: #339933;">+</span> A.<span style="color: #006633;">distanciaAte</span><span style="color: #009900;">&#40;</span>B<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://wagner.hacknroll.com/faculdade/2010/03/atividade-3-11032010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exercício 1 e 2 &#8211; 11/03/2010</title>
		<link>http://wagner.hacknroll.com/faculdade/2010/03/exercicio-1-e-2-11032010/</link>
		<comments>http://wagner.hacknroll.com/faculdade/2010/03/exercicio-1-e-2-11032010/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 23:17:46 +0000</pubDate>
		<dc:creator>Wagner Barongello</dc:creator>
				<category><![CDATA[Sistemas Digitais]]></category>
		<category><![CDATA[Circuito]]></category>
		<category><![CDATA[Exercício]]></category>
		<category><![CDATA[Robson]]></category>

		<guid isPermaLink="false">http://wagner.hacknroll.com/faculdade/?p=65</guid>
		<description><![CDATA[Resolução dos exercícios 1 e 2 de Sistemas Digitais de 11/03/2010.

Exercício 1


Tabela
A B Y
0 0 1
0 1 0
1 0 0
1 1 1
Exercício 2

]]></description>
			<content:encoded><![CDATA[<p>Resolução dos exercícios 1 e 2 de Sistemas Digitais de 11/03/2010.</p>
<p><span id="more-65"></span></p>
<p><strong>Exercício 1</strong><br />
<img src="http://img189.imageshack.us/img189/2408/sd11032010exerc11.png" alt="Exercício 1 Parte 1" /><br />
<img src="http://img715.imageshack.us/img715/904/sd11032010exerc12.png" alt="Exercício 1 Parte 2" /></p>
<p><strong>Tabela</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">A B Y<br />
0 0 1<br />
0 1 0<br />
1 0 0<br />
1 1 1</div></div>
<p><strong>Exercício 2</strong><br />
<center><img src="http://img369.imageshack.us/img369/1336/sd11032010exerc2.png" alt="Exercício 2" /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://wagner.hacknroll.com/faculdade/2010/03/exercicio-1-e-2-11032010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exercícios 1, 2 e 3 – 23/02/2010</title>
		<link>http://wagner.hacknroll.com/faculdade/2010/02/exercicios-1-2-e-3-%e2%80%93-23022010/</link>
		<comments>http://wagner.hacknroll.com/faculdade/2010/02/exercicios-1-2-e-3-%e2%80%93-23022010/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 06:28:54 +0000</pubDate>
		<dc:creator>Wagner Barongello</dc:creator>
				<category><![CDATA[Estrutura de Dados I]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Arrays]]></category>
		<category><![CDATA[Cilene]]></category>
		<category><![CDATA[Exercício]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Matriz]]></category>
		<category><![CDATA[Matrizes]]></category>
		<category><![CDATA[Vetor]]></category>
		<category><![CDATA[Vetores]]></category>

		<guid isPermaLink="false">http://wagner.hacknroll.com/faculdade/?p=53</guid>
		<description><![CDATA[Resolução e código dos exercícios 1, 2 e 3 dados pela professora Cilene na aula de Estrutura de Dados I de 23/02/2010.

Exercício 1
import java.util.*;

public class Exercicio_1 &#123;
&#160; &#160; private static int calculaIdade&#40;int anos, int meses, int dias&#41; &#123;
&#160; &#160; &#160; &#160; // Aqui assumimos anos com 365 e meses com 30 dias.
&#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>Resolução e código dos exercícios 1, 2 e 3 dados pela professora Cilene na aula de Estrutura de Dados I de 23/02/2010.</p>
<p><span id="more-53"></span></p>
<p><strong>Exercício 1</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.*</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Exercicio_1 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> calculaIdade<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> anos, <span style="color: #000066; font-weight: bold;">int</span> meses, <span style="color: #000066; font-weight: bold;">int</span> dias<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Aqui assumimos anos com 365 e meses com 30 dias.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> anos <span style="color: #339933;">*</span> 365 <span style="color: #339933;">+</span> meses <span style="color: #339933;">*</span> 30 <span style="color: #339933;">+</span> dias<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Scanner scanner <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Scanner<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">in</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Quantos anos você tem?<span style="color: #000099; font-weight: bold;">\n</span>Digite: &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> anos <span style="color: #339933;">=</span> scanner.<span style="color: #006633;">nextInt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;E quantos meses?<span style="color: #000099; font-weight: bold;">\n</span>Digite: &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> meses <span style="color: #339933;">=</span> scanner.<span style="color: #006633;">nextInt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;E quantos dias?<span style="color: #000099; font-weight: bold;">\n</span>Digite: &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> dias <span style="color: #339933;">=</span> scanner.<span style="color: #006633;">nextInt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> diasVividos <span style="color: #339933;">=</span> calculaIdade<span style="color: #009900;">&#40;</span>anos, meses, dias<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Você viveu: &quot;</span> <span style="color: #339933;">+</span> diasVividos <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; dias.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Salvar, compilar e executar</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;Salve como: Exercicio_1.java<br />
Compile com: javac Exercicio_1.java<br />
Execute com: java Exercicio_1</div></div>
<p><strong>Resultado do Exercício 1</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Quantos anos você tem?<br />
Digite: 22<br />
E quantos meses?<br />
Digite: 6<br />
E quantos dias?<br />
Digite: 0<br />
Você viveu: 8210 dias.</div></div>
<p><strong>Exercício 2</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Exercicio_2 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> classificaNadador<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> idade<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> retorno<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idade <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retorno <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Sem Categoria&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idade <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retorno <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Infantil A&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idade <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retorno <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Infantil B&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idade <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">13</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retorno <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Juvenil A&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>idade <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">17</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retorno <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Juvenil B&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; retorno <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Adulto&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> retorno<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;: &quot;</span> <span style="color: #339933;">+</span> classificaNadador<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Salvar, compilar e executar</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;Salve como: Exercicio_2.java<br />
Compile com: javac Exercicio_2.java<br />
Execute com: java Exercicio_2</div></div>
<p><strong>Resultado do Exercício 2</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">0: Sem Categoria<br />
1: Sem Categoria<br />
2: Sem Categoria<br />
3: Sem Categoria<br />
4: Sem Categoria<br />
5: Infantil A<br />
6: Infantil A<br />
7: Infantil A<br />
8: Infantil B<br />
9: Infantil B<br />
10: Infantil B<br />
11: Juvenil A<br />
12: Juvenil A<br />
13: Juvenil A<br />
14: Juvenil B<br />
15: Juvenil B<br />
16: Juvenil B<br />
17: Juvenil B<br />
18: Adulto<br />
19: Adulto</div></div>
<p><strong>Exercício 3</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> copiaNaoNulos<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> A<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> i, max <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> A.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>A<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> 0<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; max<span style="color: #339933;">++;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> B <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>max<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> indice <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> A.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>A<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">&gt;</span> 0<span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; B<span style="color: #009900;">&#91;</span>indice<span style="color: #339933;">++</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> A<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> B<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> A <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>10<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; A<span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>2<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>3<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>4<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; A<span style="color: #009900;">&#91;</span>5<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>6<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>7<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">6</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>8<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span> A<span style="color: #009900;">&#91;</span>9<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">7</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> B <span style="color: #339933;">=</span> copiaNaoNulos<span style="color: #009900;">&#40;</span>A<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> B.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>B<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Salvar, compilar e executar</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;Salve como: Exercicio_3.java<br />
Compile com: javac Exercicio_3.java<br />
Execute com: java Exercicio_3</div></div>
<p><strong>Resultado do Exercício 3</strong></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">5<br />
1<br />
2<br />
3<br />
7</div></div>
]]></content:encoded>
			<wfw:commentRss>http://wagner.hacknroll.com/faculdade/2010/02/exercicios-1-2-e-3-%e2%80%93-23022010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Instalando o Java</title>
		<link>http://wagner.hacknroll.com/faculdade/2010/02/instalando-o-java/</link>
		<comments>http://wagner.hacknroll.com/faculdade/2010/02/instalando-o-java/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 06:29:08 +0000</pubDate>
		<dc:creator>Wagner Barongello</dc:creator>
				<category><![CDATA[Dicas]]></category>
		<category><![CDATA[Aparecido]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Instalar]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[SUN]]></category>

		<guid isPermaLink="false">http://wagner.hacknroll.com/faculdade/?p=37</guid>
		<description><![CDATA[Post explicando passo a passo como isntalar o Java. Desde onde baixar, qual baixar, a diferença entre eles, qual utilizar, como instalar, como configurar e como utilizar.

Download
Para este psot utilizaremos o Java da SUN. Portanto, basta ir ao site do Java da SUN, clicar em Downloads no menu horizontal e escolher Java SE no menu [...]]]></description>
			<content:encoded><![CDATA[<p>Post explicando passo a passo como isntalar o Java. Desde onde baixar, qual baixar, a diferença entre eles, qual utilizar, como instalar, como configurar e como utilizar.</p>
<p><span id="more-37"></span></p>
<p><strong>Download</strong><br />
Para este psot utilizaremos o Java da SUN. Portanto, basta ir ao site do <a href="http://java.sun.com/">Java da SUN</a>, clicar em Downloads no menu horizontal e escolher Java SE no menu que aparecer verticalmente.</p>
<p>&#8220;Mas por que Java SE?&#8221;</p>
<p>Porque é o pacote mais simples para iniciar tarefas e trabalhos. Não contém diversos pacotes adicionais que não serão usados no momento.</p>
<p><strong>Distribuições do Java</strong></p>
<ul>
<li><strong>Java SE</strong>: SE de Standard Edition. Pacote padrão do Java, com o básico e o necessário para aplicações simples, Applets e a maioria das aplicações desktop.</li>
<li><strong>Java EE</strong>: EE de Enterprise Edition. Pacote empresarial do Java, contendo diversos pacotes a mais para se trabalhar principalmente com servlets e aplicações server-side.</li>
<li><strong>Java ME</strong>: ME de Micro Edition. Pacote para celulares e alguns computadores de mão.</li>
<li><strong>JavaFX</strong>: Pacote gráfico que visa rodar em desktops, browsers, celulares, TVs, vídeo-games, blu-rays, etc. Sua programação é diferenciada, é feita através de uma linguagem estática tipada e declarada chamada JavaFX Script.</li>
</ul>
<p><strong>Download do Java SE</strong><br />
Pronto, agora há outro problema: qual pacote do Java SE deverá ser baixado? Simples, o JDK (Java Development Kit) puro.</p>
<p><strong>Distribuições do Java SE</strong></p>
<ul>
<li><strong>JRE</strong>: Pacote apenas para executar o Java SE, sem o compilador.</li>
<li><strong>JDK</strong>: Versão completa do Java SE, a qual será feita o download.</li>
<li><strong>JDK + JavaFX</strong>: Pacote com o JavaFX incluso.</li>
<li><strong>JDK + NetBeans</strong>: Pacote com a IDE (Integrated Development Environment) NetBeans inclusa.</li>
<li><strong>JDK + Java EE</strong>: Pacote com o Java EE incluso.</li>
</ul>
<p><strong>Versão do JDK do Java SE</strong><br />
No momento em que escrevo esse post o JDK está na versão 6 update 18.</p>
<p><strong>Instalando</strong><br />
Basta ir dando next e concordando com os contratos, atente-se apenas para duas coisas:</p>
<ol>
<li>Marque todos os itens para serem instalados.</li>
<li>Desmarque o plugin da SUN para todos os browsers instalados. Pode gerar incompatibilidade.</li>
</ol>
<p><strong>Configurando o ambiente</strong></p>
<ol>
<li>Segure a WinKey (tecla entre o Ctrl e o Alt) e pressione Pause Break (ou simplesmente: painel de controle e clique em sistema).</li>
<li>Vá até a aba Avançado.</li>
<li>Clique em variáveis de ambiente.</li>
<li>Clique em adicionar e adicione as seguintes variáveis de usuário:
<ul>
<li><strong>JAVA_HOME</strong>: C:\Arquivos de programas\Java\jdk1.6.0_18</li>
<li><strong>CLASSPATH</strong>: .;%JAVA_HOME%</li>
<li><strong>PATH</strong>: %JAVA_HOME%\bin (Obs.: caso a variável PATH já exista, acrescente %JAVA_HOME% ao fim dela separados por um <img src='http://wagner.hacknroll.com/faculdade/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
        </ul>
</li>
</ol>
<p><strong>Usando o Java</strong><br />
Crie em sua área de trabalho um arquivo chamado HelloWorld.java e escreva em seu conteúdo:</p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> HelloWorld <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello, World!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Para compilar, abra um console do MS-DOS, navegue até a área de trabalho e digite o seguinte para compilar o arquivo HelloWorld.java:</p>
<p>javac HelloWorld.java</p>
<p>Note que para compilar usa-se o JAVAC e é necessário informar a extensão do arquivo: .java.</p>
<p>Para testar, digite:</p>
<p>java HelloWorld</p>
<p>Note que para executar usa-se o comando JAVA e passa-se o nome da CLASSE e não o do ARQUIVO. Sendo assim, omitimos a extensão .class do arquivo compilado anteriormente.</p>
<p>O resultado será a impressão na tela:</p>
<p>Hello, World!</p>
<p><strong>Conclusão</strong><br />
Como disse o professor, aprenda primeiro a linguagem, depois facilite com as IDEs do mercado. Mas, para quem gosta, as mais conhecidas são:</p>
<ul>
<li><a href="http://www.eclipse.org/" target="_blank">Eclipse</a></li>
<li><a href="http://www.netbeans.org/" target="_blank">NetBeans</a></li>
</ul>
<p>Qualquer dúvida, crítica ou sugestão, entre em contato.</p>
]]></content:encoded>
			<wfw:commentRss>http://wagner.hacknroll.com/faculdade/2010/02/instalando-o-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programas de Cálculo I</title>
		<link>http://wagner.hacknroll.com/faculdade/2010/02/programas-de-calculo-i/</link>
		<comments>http://wagner.hacknroll.com/faculdade/2010/02/programas-de-calculo-i/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 21:18:57 +0000</pubDate>
		<dc:creator>Wagner Barongello</dc:creator>
				<category><![CDATA[Cálculo I]]></category>
		<category><![CDATA[Desenhar]]></category>
		<category><![CDATA[Gráfico]]></category>
		<category><![CDATA[Graphmatica]]></category>
		<category><![CDATA[KmPlot]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plotar]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WinPlot]]></category>

		<guid isPermaLink="false">http://wagner.hacknroll.com/faculdade/?p=25</guid>
		<description><![CDATA[Links para download dos programas de plotagem de gráficos que serão utilizados em Cálculo I.

Windows
WinPlot
Download
Página
Graphmatica
Download
Página
Linux/FreeBSD/*nix
Existem vários, mas recomendo o KmPlot. Pode ser encontrado nos pacotes educacionais de matemática do KDE.
Dentre os outros conhecidos e bons:

Generic Mapping Tools
Gnuplot
Grace
GraphCalc
Gretl
HippoDraw
IDPS
KChart
KST
LabPlot
MayaVi
OpenScientist
Ploticus
QtiPlot
ROOT
SciDAVis
SciGraphica
VisIt
Xgraph

]]></description>
			<content:encoded><![CDATA[<p>Links para download dos programas de plotagem de gráficos que serão utilizados em Cálculo I.</p>
<p><span id="more-25"></span></p>
<p><strong>Windows</p>
<p>WinPlot</strong><br />
<a href="http://math.exeter.edu/rparris/peanut/wppr32z.exe">Download</a><br />
<a href="http://math.exeter.edu/rparris/winplot.html">Página</a></p>
<p><strong>Graphmatica</strong><br />
<a href="http://www.graphmatica.com/Graphmatica20g_setup.exe">Download</a><br />
<a href="http://www.graphmatica.com/">Página</a></p>
<p><strong>Linux/FreeBSD/*nix</strong><br />
Existem vários, mas recomendo o <a href="http://edu.kde.org/kmplot/">KmPlot</a>. Pode ser encontrado nos pacotes educacionais de matemática do KDE.</p>
<p>Dentre os outros conhecidos e bons:</p>
<ul>
<li>Generic Mapping Tools</li>
<li>Gnuplot</li>
<li>Grace</li>
<li>GraphCalc</li>
<li>Gretl</li>
<li>HippoDraw</li>
<li>IDPS</li>
<li>KChart</li>
<li>KST</li>
<li>LabPlot</li>
<li>MayaVi</li>
<li>OpenScientist</li>
<li>Ploticus</li>
<li>QtiPlot</li>
<li>ROOT</li>
<li>SciDAVis</li>
<li>SciGraphica</li>
<li>VisIt</li>
<li>Xgraph</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://wagner.hacknroll.com/faculdade/2010/02/programas-de-calculo-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Atividade 1 e 2 &#8211; 18/02/2010</title>
		<link>http://wagner.hacknroll.com/faculdade/2010/02/atividade-1-e-2-18022010/</link>
		<comments>http://wagner.hacknroll.com/faculdade/2010/02/atividade-1-e-2-18022010/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 03:14:33 +0000</pubDate>
		<dc:creator>Wagner Barongello</dc:creator>
				<category><![CDATA[Paradigmas de Programação]]></category>
		<category><![CDATA[Aparecido]]></category>
		<category><![CDATA[Atividade]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://wagner.hacknroll.com/faculdade/?p=8</guid>
		<description><![CDATA[Resolução e código das atividades 1 e 2 dadas pelo Aparecido na aula Paradigmas de Programação de 18/02/2010.

Atividade 1

Questão 1: D
Questão 2: C
Questão 3: B
Questão 4: B
Questão 5: C
Questão 6: A
Questão 7: C
Questão 8: B

Atividade 2
Arquivo Cliente.java
// Sem tratar erros, sem importar java.io.* explicitamente,
// sem usar this explicitamente, sem dar typecast explicitamente e
// sem formatar [...]]]></description>
			<content:encoded><![CDATA[<p>Resolução e código das atividades 1 e 2 dadas pelo Aparecido na aula Paradigmas de Programação de 18/02/2010.</p>
<p><span id="more-8"></span></p>
<p><strong>Atividade 1</strong></p>
<ul>
<li>Questão 1: D</li>
<li>Questão 2: C</li>
<li>Questão 3: B</li>
<li>Questão 4: B</li>
<li>Questão 5: C</li>
<li>Questão 6: A</li>
<li>Questão 7: C</li>
<li>Questão 8: B</li>
</ul>
<p><strong>Atividade 2</p>
<p>Arquivo Cliente.java</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// Sem tratar erros, sem importar java.io.* explicitamente,</span><br />
<span style="color: #666666; font-style: italic;">// sem usar this explicitamente, sem dar typecast explicitamente e</span><br />
<span style="color: #666666; font-style: italic;">// sem formatar os valores corretamente</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Cliente <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> codigo<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> nome, endereco<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">float</span> limite<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Cliente<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> c, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> n, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> e, <span style="color: #000066; font-weight: bold;">float</span> l<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; codigo <span style="color: #339933;">=</span> c<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; nome <span style="color: #339933;">=</span> n<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; endereco <span style="color: #339933;">=</span> e<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; limite <span style="color: #339933;">=</span> l<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> imprimirDados<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Código: &nbsp; &quot;</span> <span style="color: #339933;">+</span> codigo <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">&quot;Nome: &nbsp; &nbsp; &quot;</span> <span style="color: #339933;">+</span> nome <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">&quot;Endereço: &quot;</span> <span style="color: #339933;">+</span> endereco <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #339933;">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #0000ff;">&quot;Limite: &nbsp; &quot;</span> <span style="color: #339933;">+</span> limite<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span>z<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> imprimirTipo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Tipo: &nbsp; &nbsp; Cliente &quot;</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>limite <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">10000</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">&quot;VIP&quot;</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span>limite <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">1000</span> <span style="color: #339933;">?</span> <span style="color: #0000ff;">&quot;Potencial&quot;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Perigoso&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Arquivo Test_Cliente.java</strong></p>
<div class="codecolorer-container java twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Test_Cliente <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Cliente A <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Cliente<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1234</span>, <span style="color: #0000ff;">&quot;METALURGICA ABC&quot;</span>, <span style="color: #0000ff;">&quot;Rua Gov. Valadares, 100 - SP&quot;</span>, 3400<span style="color: #009900;">&#41;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; B <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Cliente<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5678</span>, <span style="color: #0000ff;">&quot;Supermercado São Leopoldo&quot;</span>, <span style="color: #0000ff;">&quot;Rua Paraíso, 350 - SP&quot;</span>, 12000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; A.<span style="color: #006633;">imprimirDados</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; A.<span style="color: #006633;">imprimirTipo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; B.<span style="color: #006633;">imprimirDados</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; B.<span style="color: #006633;">imprimirTipo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p><strong>Para compilar</strong></p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">javac Cliente.java Test_Cliente.java</div></div>
<p><strong>Para rodar e testar</strong></p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:555px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">java Test_Cliente</div></div>
<p><strong>Resultado</strong></p>
<pre>Código:   1234
Nome:     METALURGICA ABC
Endereço: Rua Gov. Valadares, 100 - SP
Limite:   3400.0
Tipo:     Cliente Potencial

Código:   5678
Nome:     Supermercado São Leopoldo
Endereço: Rua Paraíso, 350 - SP
Limite:   12000.0
Tipo:     Cliente VIP</pre>
]]></content:encoded>
			<wfw:commentRss>http://wagner.hacknroll.com/faculdade/2010/02/atividade-1-e-2-18022010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

