vendredi 17 avril 2015

The task is to modify the given code so that we can use the classes to write text to a file instead


Vote count:

0




class Text def initialize end def write (line) print (line) print ("\n") end end class Dash def initialize (object) @object=object end def write (line) print (’-’) @object.write (line) print ("\n") end end class Positive def initialize (object) @object=object end def write (line) print (’+’) @object.write (line) print ("\n") end end



asked 1 min ago







The task is to modify the given code so that we can use the classes to write text to a file instead

Aucun commentaire:

Enregistrer un commentaire