some code samples, various examples of simple modeling ideas and some minor algorithms.

HipsterIpsumReader.java 495B

12345678910111213141516171819
  1. import java.io.*;
  2. import java.util.*;
  3. import java.text.*;
  4. public class HipsterIpsumReader
  5. {
  6. TextIO textIO = new TextIO();
  7. String fileName = "HipsterIpsum.txt";
  8. public void readFile() throws IOException {
  9. BufferedReader br = textIO.open(fileName);
  10. boolean endOfFile = false;
  11. while (!endOfFile){
  12. String fileContents = br.readLine();
  13. System.out.println(fileContents);
  14. if(br.readLine()==null)endOfFile=true;
  15. }
  16. }
  17. }