This assignment will take some of the work that you did in Lab 1, extend that work somewhat, make it adhere to the class style guidelines, and electronically submit it. The class style guidelines are in https://cs.brynmawr.edu/cs151/style.html
UNIX lab machine: cp /home/gtowell/Public/151/A01/ReadCSV.java ReadCSV.java cp /home/gtowell/Public/151/A01/us.csv us.csv On your personal computer: scp YOURUNIXLOGIN@goldengate.cs.brynmawr.edu:/home/gtowell/Public/151/A01/ReadCSV.java ReadCSV.java scp YOURUNIXLOGIN@goldengate.cs.brynmawr.edu:/home/gtowell/Public/151/A01/us.csv us.csvif you are working on your own computer you will need to enter your UNIX password after each of the scp commands.
The method ReadCSV.csvCollectionArray() returns an array that contains arrays of Strings. This is very general purpose, the csvCollectionArray method can be used to read pretty much any CSV file, but it is nonetheless awkward and not particularly Object-Oriented to have this as the data format. So, your task is to write a method that takes the array of String arrays (ie a 2-d array of strings) and returns an array containing instances of a class you will write to contain the data in the file "us.csv".
The file us.csv has the following form:
921135,jcbbdf 864364,igedge 431110,edbbbaThe first item in each line is an integer (you can use Integer.parseInt("string")) to transform a string into an int. The second item is a string.
Create a class of your own design that has instance variables for holding each of the items on a line. Some requirements of the class:
Finally, create a method within the ReadCSV class that takes the output of csvCollectionArray and returns ar array containing instances of your class. For instance the signature of that method might be
YOURCLASS[] csvCollectionME(String[][] data)If you write your program on computers other than those in the lab, be aware that your program will be graded based on how it runs on the department’s Linux server, not how it runs on your computer. What this means is that your programs should not use any classes that are not a part of Java 11. For instance, if you took cs113 last semester you might be accustomed to using some classes that are not a part of Java 11. Watch out for those. Similarly, if you have installed Java 14 on you own machine, you might use classes that ae not a part of Java 11. (While neither of these issues are likely to arise. ) The submission should include the following items:
Probably the easiest way to create the readme file is to make it within Visual Studio Code. Do the same thing you do to create code files, but name the file "README.txt", then write text into it.
If you have done all of your work on a computer not in the CS lab, you will have to transfer everything to CS department computer before you can submit. The following steps should work on a Mac or a Windows 10 PC
ssh YOURUNIXLOGIN@goldengate.cs.brynmawr.edu
scp * YOUR_CS_NAME@goldengate.cs.brynmawr.edu:cs151/Assignment1
If you get confused / lost in the submission process see the Lab TAs or me. The TAs can certainly help with any programming questions and should be able to help with the submission process also.