亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? appendc.htm

?? Thinking in Java, 2nd edition
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<!--
This document was converted from RTF source: 
By rtftohtml 4.19
See http://www.sunpack.com/RTF
Filename:TIJ2.rtf
Application Directory:C:\TOOLS\RTF2HTML\
Subject:
Author:Bruce Eckel
Operator:Bruce Eckel
Document Comments:
Version Comments:
Comments:
Keywords:
Translation Date:05/21/2001
Translation Time:10:39:35
Translation Platform:Win32
Number of Output files:23
This File:AppendC.htm
SplitDepth=1
SkipNavPanel=1
SkipLeadingToc=1
SkipTrailingToc=1
GenContents=1
GenFrames=1
GenIndex=1
-->
<HEAD lang="en"><META http-equiv="Content-Type" content="text/html">
<TITLE>C: Java Programming Guidelines</TITLE>
</HEAD>

<BODY  BGCOLOR="#FFFFFF"><DIV ALIGN="CENTER">
  <a href="http://www.MindView.net">
  <img src="mindview.gif" alt="MindView Inc." BORDER = "0"></a>
  <CENTER>
    <FONT FACE="Verdana" size = "-1">
    [ <a href="README.txt">Viewing Hints</a> ]
    [ <a href="RevHist.htm">Revision History</a> ]
    [ <a href="http://www.mindview.net/Books/TIJ/">Book Home Page</a> ]
    [ <a href="http://www.mindview.net/Etc/MailingList.html">Free Newsletter</a> ] <br>
    [ <a href="http://www.mindview.net/Seminars">Seminars</a> ]
    [ <a href="http://www.mindview.net/CDs">Seminars on CD ROM</a> ]
    [ <a href="http://www.mindview.net/Services">Consulting</a> ]
    </FONT>
  <H2><FONT FACE="Verdana">
  Thinking in Java, 2nd edition, Revision 12</FONT></H2>
  <H3><FONT FACE="Verdana">&copy;2000 by Bruce Eckel</FONT></H3>
  
    <FONT FACE="Verdana" size = "-1">
     [ <a href="AppendB.htm">Previous Chapter</a> ] 
    [ <a href="SimpCont.htm">Short TOC</a> ] 
    [ <a href="Contents.htm">Table of Contents</a> ] 
    [ <a href="DocIdx.htm">Index</a> ]
     [ <a href="AppendD.htm">Next Chapter</a> ] 
    </FONT>
    
  </CENTER>
  </P></DIV><A NAME="Appendix_B"></A><A NAME="Appendix_C"></A><A NAME="_Toc375545509"></A><A NAME="_Toc477690738"></A><A NAME="_Toc481064959"></A><A NAME="Heading640"></A><FONT FACE = "Verdana"><H1 ALIGN="LEFT">
C: Java Programming Guidelines</H1></FONT>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia" SIZE=4><backtalk:display ID=TIJ3_APPENDIXC_I0>
This
appendix contains suggestions to help guide you in performing low-level program
design, and in writing
<A NAME="Index2294"></A><A NAME="Index2295"></A><A NAME="Index2296"></A><A NAME="Index2297"></A>code.</FONT><BR></P></DIV>
<DIV ALIGN="LEFT"><P><FONT FACE="Georgia">Naturally, these are guidelines and not
rules. The idea is to use them as inspirations, and to remember that there are
occasional situations where you need to bend or break a rule.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I0' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I1>
</FONT><A NAME="_Toc481064960"></A><BR></P></DIV>
<A NAME="Heading641"></A><FONT FACE = "Verdana"><H2 ALIGN="LEFT">
Design</H2></FONT>
<OL>
<LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Elegance always
pays off</B>. In the short term it might seem like it takes much longer to come
up with a truly graceful solution to a problem, but when it works the first time
and easily adapts to new situations instead of requiring hours, days, or months
of struggle, you&#8217;ll see the rewards (even if no one can measure them). Not
only does it give you a program that&#8217;s easier to build and debug, but
it&#8217;s also easier to understand and maintain, and that&#8217;s where the
financial value lies. This point can take some experience to understand, because
it can appear that you&#8217;re not being productive while you&#8217;re making a
piece of code elegant. Resist the urge to hurry; it will only slow you down.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I1' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I2>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>First
make it work, then make it fast</B>. This is true even if you are certain that a
piece of code is really important and that it will be a principal bottleneck in
your system. Don&#8217;t do it. Get the system going first with as simple a
design as possible. Then if it isn&#8217;t going fast enough, profile it.
You&#8217;ll almost always discover that &#8220;your&#8221; bottleneck
isn&#8217;t the problem. Save your time for the really important stuff.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I2' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I3>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Remember
the &#8220;divide and conquer&#8221; principle</B>. If the problem you&#8217;re
looking at is too confusing, try to imagine what the basic operation of the
program would be, given the existence of a magic &#8220;piece&#8221; that
handles the hard parts. That &#8220;piece&#8221; is an object&#8212;write the
code that uses the object, then look at the object and encapsulate <I>its</I>
hard parts into other objects, etc.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I3' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I4>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Separate
the class creator from the class user (<I>client programmer</I>)</B>. The class
user is the &#8220;customer&#8221; and doesn&#8217;t need or want to know
what&#8217;s going on behind the scenes of the class. The class creator must be
the expert in class design and write the class so that it can be used by the
most novice programmer possible, yet still work robustly in the application.
Library use will be easy only if it&#8217;s transparent.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I4' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I5>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>When
you create a class, attempt to make your names so clear that comments are
unnecessary</B>. Your goal should be to make the client programmer&#8217;s
interface conceptually simple. To this end, use method overloading when
appropriate to create an intuitive, easy-to-use interface.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I5' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I6>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Your
analysis and design must produce, at minimum, the classes in your system, their
public interfaces, and their relationships to other classes, especially base
classes</B>. If your design methodology produces more than that, ask yourself if
all the pieces produced by that methodology have value over the lifetime of the
program. If they do not, maintaining them will cost you. Members of development
teams tend not to maintain anything that does not contribute to their
productivity; this is a fact of life that many design methods don&#8217;t
account for.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I6' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I7>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Automate
everything</B>.<B> </B>Write the test code first (before you write the class),
and keep it with the class. Automate the running of your tests through a
makefile or similar tool. This way, any changes can be automatically verified by
running the test code, and you&#8217;ll immediately discover errors. Because you
know that you have the safety net of your test framework, you will be bolder
about making sweeping changes when you discover the need. Remember that the
greatest improvements in languages come from the built-in testing provided by
type checking, exception handling, etc., but those features take you only so
far. You must go the rest of the way in creating a robust system by filling in
the tests that verify features that are specific to your class or program.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I7' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I8>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Write
the test code first (before you write the class) in order to verify that your
class design is complete</B>. If you can&#8217;t write test code, you
don&#8217;t know what your class looks like. In addition, the act of writing the
test code will often flush out additional features or constraints that you need
in the class&#8212;these features or constraints don&#8217;t always appear
during analysis and design. Tests also provide example code showing how your
class can be used.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I8' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I9>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>All
software design problems can be simplified by introducing an extra level of
conceptual indirection</B><I>.</I> This fundamental rule of software
engineering</FONT><A NAME="fnB85" HREF="#fn85">[85]</A><A NAME="Index2298"></A><FONT FACE="Georgia">
is the basis of abstraction, the primary feature of object-oriented programming.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I9' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I10>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>An
indirection should have a meaning </B>(in concert with guideline 9). This
meaning can be something as simple as &#8220;putting commonly used code in a
single method.&#8221; If you add levels of indirection (abstraction,
encapsulation, etc.) that don&#8217;t have meaning, it can be as bad as not
having adequate indirection.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I10' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I11>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Make
classes as atomic as possible</B>. Give each class a single, clear purpose. If
your classes or your system design grows too complicated, break complex classes
into simpler ones. The most obvious indicator of this is sheer size: if a class
is big, chances are it&#8217;s doing too much and should be broken
up.</FONT><BR><FONT FACE="Georgia">Clues to suggest redesign of a class
are:</FONT><BR><FONT FACE="Georgia">1) A complicated switch statement: consider
using polymorphism. </FONT><BR><FONT FACE="Georgia">2) A large number of methods
that cover broadly different types of operations: consider using several
classes.</FONT><BR><FONT FACE="Georgia">3) A large number of member variables
that concern broadly different characteristics: consider using several classes.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I11' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I12>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Watch
for long argument lists</B>. Method calls then become difficult to write, read,
and maintain. Instead, try to move the method to a class where it is (more)
appropriate, and/or pass objects in as arguments.

</backtalk:display>
[&nbsp;<a href='http://www.mindview.net/backtalk/CommentServlet?ID=TIJ3_APPENDIXC_I12' 
  target="_blank">Add&nbsp;Comment</a>&nbsp;]

<backtalk:display ID=TIJ3_APPENDIXC_I13>
</FONT><LI><FONT FACE="Verdana"><B>	</B></FONT><FONT FACE="Georgia"><B>Don&#8217;t

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美在线影院| 99热这里都是精品| 欧美xxxxxxxx| 国产在线精品国自产拍免费| 日韩免费看网站| 国产麻豆精品视频| 中文字幕在线免费不卡| 在线日韩一区二区| 免费三级欧美电影| 久久久久久影视| 99精品久久免费看蜜臀剧情介绍| 亚洲免费在线看| 欧美精品九九99久久| 久久99精品久久久| 国产精品看片你懂得| 色94色欧美sute亚洲线路二| 视频一区二区中文字幕| 久久久久亚洲蜜桃| 日本高清不卡在线观看| 热久久免费视频| 国产精品美女久久久久久久| 欧美羞羞免费网站| 国模套图日韩精品一区二区| 国产精品麻豆视频| 欧美精品视频www在线观看| 久久精品国产99国产精品| 欧美极品xxx| 欧美理论电影在线| 成人国产精品免费网站| 天堂久久一区二区三区| 欧美国产日韩精品免费观看| 欧美日韩一区三区四区| 国产精品一区二区在线看| 亚洲精品老司机| 久久久久国产精品麻豆ai换脸| 91麻豆精品在线观看| 久久成人免费电影| 一区二区成人在线| 欧美国产一区二区在线观看| 欧美乱熟臀69xxxxxx| 99精品视频在线观看| 久久se精品一区二区| 亚洲一区二区欧美| 欧美激情在线一区二区三区| 91精品国产综合久久福利| 波多野洁衣一区| 国产在线精品不卡| 日韩**一区毛片| 亚洲另类春色校园小说| 久久久国产一区二区三区四区小说| 在线观看三级视频欧美| 成人国产电影网| 看片网站欧美日韩| 日产精品久久久久久久性色| 亚洲精品伦理在线| 国产精品成人网| 国产性天天综合网| 精品少妇一区二区三区视频免付费 | 在线看一区二区| 国产99久久久久久免费看农村| 喷白浆一区二区| 丝袜诱惑亚洲看片| 亚洲综合一二区| 亚洲视频在线观看一区| 国产欧美日韩在线看| 精品88久久久久88久久久 | 日韩欧美国产系列| 欧美视频一区在线| 色综合视频在线观看| av亚洲精华国产精华精| 成人综合日日夜夜| 丁香一区二区三区| 不卡大黄网站免费看| 国产成人精品影院| 国产99久久久国产精品潘金| 91久久线看在观草草青青| 色综合久久久久综合| 91在线小视频| 日本韩国欧美国产| 色婷婷狠狠综合| 欧美亚洲禁片免费| 欧美男生操女生| 欧美人妇做爰xxxⅹ性高电影 | 国产精品久久夜| 椎名由奈av一区二区三区| 亚洲欧洲精品一区二区三区| 亚洲欧美影音先锋| 亚洲一线二线三线视频| 亚洲丶国产丶欧美一区二区三区| 亚洲国产成人高清精品| 五月天视频一区| 久久精品国产999大香线蕉| 韩国午夜理伦三级不卡影院| 国产一区在线观看视频| 国产精品一区二区三区网站| 成人高清免费在线播放| 91麻豆精品秘密| 精品视频123区在线观看| 91精品在线免费| 久久综合久久鬼色中文字| 日本一区二区三区dvd视频在线| 综合网在线视频| 亚洲一区二区三区在线| 日韩成人精品在线观看| 国产乱色国产精品免费视频| 99re66热这里只有精品3直播| 在线一区二区三区四区| 91精品国产综合久久香蕉麻豆| 精品久久久久久无| 亚洲日本免费电影| 午夜精品久久久久久久久 | 国产精品一线二线三线精华| 成人黄色大片在线观看| 欧美丰满高潮xxxx喷水动漫| 欧美—级在线免费片| 同产精品九九九| 国产不卡在线视频| 欧美精品视频www在线观看| 国产日韩欧美亚洲| 亚洲国产成人tv| 精品国产乱子伦一区| 中文字幕一区免费在线观看 | 日韩久久久精品| 亚洲欧美另类久久久精品2019| 日韩电影免费在线看| 成人高清免费在线播放| 日韩一区二区精品葵司在线| 中文字幕一区二区视频| 日日欢夜夜爽一区| 91在线你懂得| 国产午夜亚洲精品不卡| 午夜久久久久久久久| 成人国产精品免费观看动漫| 日韩一区二区三区电影在线观看| 17c精品麻豆一区二区免费| 久久av老司机精品网站导航| 色噜噜狠狠成人网p站| 久久精品人人做人人爽人人| 午夜精品久久久久久久99樱桃| 国产成人精品影视| 精品欧美乱码久久久久久| 亚洲一区免费视频| av成人免费在线| wwww国产精品欧美| 蜜桃视频在线观看一区| 在线观看视频欧美| 亚洲视频一区在线观看| 粉嫩av一区二区三区在线播放 | 91久久线看在观草草青青| 久久精品视频在线免费观看| 91污片在线观看| 中日韩免费视频中文字幕| 国精品**一区二区三区在线蜜桃| 精品视频1区2区3区| 亚洲精品成人天堂一二三| 国产不卡视频在线播放| 久久综合九色综合久久久精品综合| 精品国产伦一区二区三区观看体验| 午夜免费欧美电影| 欧美视频完全免费看| 亚洲精品视频在线看| 99精品欧美一区| 亚洲欧洲日韩综合一区二区| 国产成人免费在线观看| 久久久一区二区三区| 国产一区二区主播在线| 欧美精品一区二区三区蜜桃 | 欧美在线free| 一区二区三区.www| 在线精品国精品国产尤物884a| 18欧美乱大交hd1984| 一本大道久久精品懂色aⅴ| 一区视频在线播放| 99精品国产视频| 亚洲免费在线观看视频| 日本电影亚洲天堂一区| 亚洲成人激情自拍| 日韩片之四级片| 久久97超碰色| 久久久久久综合| 成人av网站在线| 一区二区三区在线播| 欧美亚州韩日在线看免费版国语版| 亚洲国产一二三| 51午夜精品国产| 久久精品国产99国产精品| 久久美女高清视频| 精品久久久影院| 本田岬高潮一区二区三区| 国产精品久久久久久妇女6080 | 亚洲亚洲人成综合网络| 欧美日韩一级黄| 久久99日本精品| 中文字幕中文乱码欧美一区二区| 日本高清不卡视频| 玖玖九九国产精品| 日韩毛片精品高清免费| 欧美日韩国产一级二级| 精品在线免费观看| 亚洲视频每日更新|