-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
48 lines (36 loc) · 2.35 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Readme - Project 2 - Tyler Sanbar
public class Driver
Provided by instructor
public class MesoStation
Provided by instructor
public class PosAvg
private String fileName = "Mesonet.txt";
private ArrayList<MesoStation> stationList; populated from read()
private int fileIndex; stores fileIndex
public PosAvg(String stID); constructor, finds file index of parameter and stores
public indexOfStation(); returns fileIndex
private read(); fills stationList from fileName;
public toString(); returns "This index is average of <station-1> and <station+1>
, <station-2> and <station+2>, and so on." where <station+-n> is the station at the index +-n
public class MesoInherit
private String fileName = "Mesonet.txt";
private ArrayList<MesoStation> stationList; populated from read()
private char[] stidChars = new char[4]; for extracting stid chars
private int[] avgList = new int[3]; array index [0] stores ceiling, [1] stores floor, [2] stores average
public MesoInherit(MesoStation station(stid)); station parameter is given manually
public int[] calAverage(); stores and returns avgList[]
public letterAverage() returns char with ASCII value == calAverage()[2]
private read(); fills stationList from fileName;
public class LetterAvg
private String fileName = "Mesonet.txt";
private ArrayList<MesoStation> stationList; populated from read()
private ArrayList<MesoStation> sameAvg; stores list of stations with the same letter avg as ltrAvg
public LetterAvg(int ltrAvg); output uses mesoInherit.letterAverage() as parameter, populates the arrays
public numberOfStationWithLetterAvg() returns the size of sameAvg()[]
private read(); fills stationList from fileName;
public toString(); "They are: /n<First>/n<Second>/n<ect...>" <> is list of elements in sameAvg()[]
This project was mostly a challenge in deciphering the guidelines and then organizing the classes appropriatly
to get the correct output. Once I wrote it all up in the earlier versions of the readme, I decided to start implementing
so I could see it a bit more clearly. Took some trial and error to sort out the kinks but most of the code was pretty simple.
Once everything was done I tested it, found some issues and fixed them, and updated github as I did. I then updated the
README as I found it better to focus on the code with this project since organizing and formatting it correctly was the real challenge.