scaled im resize(( )scaled save(str(filename)if __name__ ="__main__"scalezip(*sys argv[ : ]process_zip(look how simple this class isall that work we did earlier paid off all we do is open each file (assuming that it is an imageit will unceremoniously crash if file cannot be opened)scale itand save it back the zipprocessor class takes care of the zipping and unzipping without any extra work on our part case study for this case studywe'll try to delve further into the question"when should choose an object versus built-in type?we'll be modeling document class that might be used in text editor or word processor what objectsfunctionsor properties should it havewe might start with str for the document contentsbut in pythonstrings aren' mutable (able to be changedonce str is definedit is forever we can' insert character into it or remove one without creating brand new string object that would be leaving lot of str objects taking up memory until python' garbage collector sees fit to clean up behind us soinstead of stringwe'll use list of characterswhich we can modify at will in additiona document class would need to know the current cursor position within the listand should probably also store filename for the document real text editors use binary-tree based data structure called rope to model their document contents this book' title isn' "advanced data structures"so if you're interested in learning more about this fascinating topicyou may want to search the web for the rope data structure nowwhat methods should it havethere are lot of things we might want to do to text documentincluding insertingdeletingand selecting characterscutcopypastethe selectionand saving or closing the document it looks like there are copious amounts of both data and behaviorso it makes sense to put all this stuff into its own document class pertinent question isshould this class be composed of bunch of basic python objects such as str filenamesint cursor positionsand list of charactersor should some or all of those things be specially defined objects in their own rightwhat about individual lines and charactersdo they need to have classes of their own