Link to Dr. T homepage Link to Intro Java 1310 web page Back to Class website

Class Examples - This is the code that I have played with in each class. Obviously it is only the final version of the code that resulted from all the things that were tried in class. The newest examples will be at the top of the list.

Pictures of the whiteboard at the end of class: whiteboard pics


Code4DecF18PracFinal.java
travelers.txt
posted 4 Dec 2018

Code29NovF18.java In class, the code for array of ArrayList worked incorrectly for a couple of reasons.
1) Dr. T forgot that each ArrayList row needed to be initialized before it could have values assigned to it. See the for loop that creates (new) each row.
2) The values could be individually assigned to the elements as shown or, since the values were in the array, a double loop could be used to assign the values from the 2D array to the array of ArrayLists. See code for both ways.
posted 29 Nov 2018

CSE1310Test2Fall18v1KEY.docx
Code15NovF18.java In class, this worked incorrectly for a few reasons.
1) The index variable in the library sort method that I was using was 'i' when it should have been 'pass'.
2) In the price sort, the default price value of 0 meant that the sorting put some prices at the top of the array and some at the bottom with empty values in the middle of the arrays. I added an initialization that set all the prices to -99 initially to solve this.
3) In the string/ title sort, the strings that were initialized to " " were sorted before the other strings because the blank is earlier in the ASCII table than the letters. I added an initialization that set all the strings to a tilde because the tilde is after the letters in the ASCII table.
Code13NovF18.java
Code8NovF18.java
Code6NovF18T2.java
posted 15 Nov 2018

Code29OctF18Arrays2D.java
Code30OctF18ArrayVsArrayList.java
BMTtitleMix.txt
BMTtitleMixcapssmalls.txt
posted 30 Oct 2018

Binary examples.xlsx
posted 25 Oct 2018

Code23OctF18StringManipulation.java
Code23OctF18MathExamples.java
Code23OctF18ArrayList.java
Code23OctF18Recur.java
Code23OctF18Later.java
Code23OctF18.java
posted 24 Oct 2018

Code18OctF18.java
posted 23 Oct 2018

CSE 1310 Fall 2018 class examples:

Code16OctF18final.java
Code16OctF18.java
Code11OctF18.java
Code9OctF18.java
Code4Oct2018.java
Code27SepF18.java
bookSciFiData3.txt
posted 16 Oct 2018

Code25SepF18.java
Code20SepF18.java
bookYearTitleSeriesSciFiSpaces.txt
posted 25 Sep 2018

Code18SepF18.java
bookYearSciFi.txt
bookYearTitleSciFi.txt
bookYearTitleSeriesSciFi.txt
posted 18 Sep 2018

Code11SepF18.java
Code6SepF18.java
posted 11 Sep 2018

Code4SepF18.java
posted 4 Sep 2018

Code30AugF18.java
Code23AugSample1.java
posted 30 Aug 2018

Day 1 was syllabus and ethics statement info