Open AlexisK opened 6 years ago
Make it work with the following example:
var pen1 = new Pen ();
var paper1 = new Paper ();
pen1.write(paper1, 'Hi.\n');
pen1.write(paper1, 'I think, inks are running low.\n');
pen1.write(paper1, 'This should never be written!\n');
console.log(paper1.print());
Implement class
Pen
and classPaper
- aPen
is created with an amount of ink. It can write on thePaper
. Handle not enough ink problem.Paper
should know what is written on it.Paper
should have a method.print()
that prints it content.