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

12345678910111213141516171819202122232425
  1. import java.io.*;
  2. /**
  3. * Write a description of class UseTextIO here.
  4. *
  5. * @author (your name)
  6. * @version (a version number or a date)
  7. */
  8. public class UseTextIO
  9. {
  10. private TextIO textIO;
  11. public UseTextIO() {
  12. textIO = new TextIO();
  13. }
  14. public void getInput() throws IOException{
  15. BufferedReader br = TextIO.open(System.in);
  16. TextIO.prompt("Hello");
  17. TextIO.prompt("\n");
  18. TextIO.prompt("Type an int: ");
  19. int ask = TextIO.readInt(br);
  20. TextIO.prompt("Your int is: " + ask + "\n");
  21. }
  22. }