全文预览

毕业设计外文资料翻译--Thinking in Java 4th Edition

上传者:梦&殇 |  格式:doc  |  页数:15 |  大小:122KB

文档介绍
yaddingnewtypesofobjects,sowhenyoureadthecodedescribingthesolution,you’rereadingwordsthatalsoexpresstheproblem.Thisisamoreflexibleandpowerfullanguageabstractionthanwhatwe’vehadbefore.1Thus,OOPallowsyoutodescribetheproblemintermsoftheproblem,puterwherethesolutionwillrun.There’puter:puter—ithasastate,andithasoperationsthatyoucanaskittoperform.However,thisdoesn’tseemlikesuchabadanalogytoobjectsintherealworld—theyallhavecharacteristicsandbehaviors.haracteristicsofSmalltalk,essfulobjectorientedlanguageandoneofthelanguagesuponwhichJavaisbased.Thesecharacteristicsrepresentapureapproachtoobject-orientedprogramming:1.Everythingisanobject.Thinkofanobjectasafancyvariable;itstoresdata,butyoucan“makerequests”tothatobject,askingittoperformoperationsonitself.Intheory,ponentintheproblemyou’retryingtosolve

收藏

分享

举报
下载此文档