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

UseTextIO.java 690B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import java.io.*;
  2. import java.util.*;
  3. import java.text.*;
  4. /**
  5. * Write a description of class UseTextIO here.
  6. *
  7. * @author (your name)
  8. * @version (a version number or a date)
  9. */
  10. public class UseTextIO
  11. {
  12. // instance variables - replace the example below with your own
  13. TextIO textio = new TextIO();
  14. private int x = 7;
  15. private String words = "These are words";
  16. /**
  17. * Constructor for objects of class UseTextIO
  18. */
  19. public UseTextIO()
  20. {
  21. }
  22. /**
  23. *
  24. */
  25. public void usePrompt()
  26. {
  27. textio.prompt(textio.writeDouble(5, 4, 3)) ;
  28. }
  29. public void open()
  30. {
  31. textio.prompt(textio.writeInt(4, 3));
  32. }
  33. }