<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-forward-container"><br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject:
</th>
<td>Re: CSC 204 Program 5</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Thu, 8 Dec 2016 05:45:49 -0500</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>Andrew J. Pounds <a class="moz-txt-link-rfc2396E" href="mailto:pounds_aj@mercer.edu"><pounds_aj@mercer.edu></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Reply-To:
</th>
<td><a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td><br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 12/07/2016 10:38 PM, wrote:<br>
</div>
<blockquote
cite="mid:377c0df998b84e669cccb50daa6f468d@spiderman.MercerU.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<div>Ok that helps a lot thank you. So let me make sure I
understand this. So our stations and state arrays from program
4, we can keep the same but make them arraylists? As in the
states arraylist shouldn't have duplicate states. It should
have the combined average temp for each state just like
program 4? And then the daily arraylist should have all
400,000+ daily readings and the state it goes with? And then
we sort that huge arraylist by hottest and coldest and get the
state station number and avg state temp based on the hottest
and coldest reading?</div>
<div id="AppleMailSignature"><br>
</div>
<br>
</blockquote>
<br>
Generally you are correct. Keep the State.java and Station.java
objects as they are in Program 4, but in your program 5 store the
objects in ArrayLists. I STRONGLY recommend adding a third
object class, Daily.java, that looks a lot like Station.java but
that has a stationID and a daily average temp as instance
variables. Each time you process a line from the Daily.txt file
you then crate a new Daily object that holds the stationID and
temp and then put that object into your ArrayList. <br>
<br>
Once you have read all of the lines from the Daily.txt file you
should have the 400,000+ daily readings stored as objects (with
stationID and temp) in an ArrayList that you can sort. When you
print out the results you can recover the state that goes with the
stationID from your stations ArrayList (which holds Station
objects) and then use the state to recover the average temp from
the stateData (which holds State objects with average yearly temp
info) to get the average temp.<br>
<br>
All of you -- keep the questions coming so you can knock this
out! We will also dedicate most of classtime tomorrow to work on
this.<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</div>
</body>
</html>