CS 4773 Object Oriented Systems March 30, 2005
Topics for today:
- Java Collections
- Editor dated March 30 available - has GUI 2 with limited functionality
- Needed changes to editor design:
- EditingSession needs the following public methods:
- public boolean insertLineAfter(int n, String s);
Inserts the given line after line n.
All lines after this one are moved down.
Returns true on success and false on failure.
Failure occurs when n is not a valid line number
(negative for strictly greater than the number of lines) or
String does not end in a newline.
- public boolean insertLineBefore(int n, String s);
As above, but inserts the line before line n.
- public boolean removeLine(int n);
Removes line n if it exists.
All lines after this are moved up.