Create two public methods write and header