Skip to content

tylersanbar/Project2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages