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

UsesTextIO.java 487B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * Write a description of class UsesTextIO here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class UsesTextIO
  8. {
  9. TextIO text = new TextIO();
  10. /**
  11. * Constructor for objects of class UsesTextIO
  12. */
  13. public UsesTextIO(TextIO t)
  14. {
  15. // initialise instance variables
  16. text = t;
  17. }
  18. public double readDouble(double d){
  19. return text.readDouble(text.open(("d")));
  20. }
  21. }