package fi.helsinki.cs.tmc.cli.io;

public abstract class Io {

    public abstract void print(String str);

    public void print(Object obj) {
        print(String.valueOf(obj));
    }

    public void println(String str) {
        print(str + "\n");
    }

    public abstract String readLine(String prompt);

    public abstract String readPassword(String prompt);
}

@@ -29,16 +29,93 @@
 li.io;%0A%0A
+import java.io.IOException;%0Aimport java.io.Writer;%0Aimport java.util.Arrays;%0A%0A
 public a
@@ -131,16 +131,31 @@
 lass Io 
+extends Writer 
 %7B%0A%0A    p
@@ -394,24 +394,24 @@
 g prompt);%0A%0A
-
     public a
@@ -453,11 +453,316 @@
 prompt);
+%0A%0A    @Override%0A    public void write(char%5B%5D cbuf, int offset, int len) throws IOException %7B%0A        print(new String(Arrays.copyOfRange(cbuf, offset, offset + len)));%0A    %7D%0A%0A    @Override%0A    public void flush() throws IOException %7B%0A    %7D%0A%0A    @Override%0A    public void close() throws IOException %7B%0A    %7D
 %0A%7D%0A

Extend the writer class in the IO class.