第3章
*/
publicclassBlahextendsSomeClass{
/*Aclassimplementationmentcangohere.*/
小A:“师兄你这是考我么?”
大B:“啥啊?我这是想看你在学校是不是真学到了东西。”
小A:“得得得,那我就说说吧!设计模式是一套被反复使用、多数人知晓的、经过分类编目的、代码设计经验的总结。使用设计模式是为了可重用代码、让代码更容易被他人理解、保证代码可靠性。设计模式于己于他人于系统都是多赢的,设计模式使代码编制真正工程化,设计模式是软件工程的基石,如同大厦的一块块砖石一样。”
*/
privatestaticObjectclassVar2;
/**instanceVar1documentationment*/
publicObjectinstanceVar1;
/**instanceVar2documentationment*/
protectedintinstanceVar2;
/**instanceVar3documentationment*/
privateObjectinstanceVar3;
/**
publicclassBlahextendsSomeClass{
/*Aclassimplementationmentcangohere.*/
*classVar2documentationmentthathappenstobe
*morethanonelinelong
*/
privatestaticObjectclassVar2;
/**instanceVar1documentationment*/
publicObjectinstanceVar1;
/**instanceVar2documentationment*/
protectedintinstanceVar2;
/**instanceVar3documentationment*/
privateObjectinstanceVar3;
/**
*……constructorBlahdocumentationment……
*/
publicBlah{
//……implementationgoeshere……
/**
*……methoddoSomethingdocumentationment……
*/
publicvoiddoSomething{
//……implementationgoeshere……
/**
*……methoddoSomethingElsedocumentationment……
*amsomeParamdescription
*/
publicvoiddoSomethingElse(ObjectsomeParam){
//……implementationgoeshere……
大B:“我再考考你,用C++、Java、C#www.youxs.org。”
小A不到几分钟就给大B一个程序。
*Classdescriptiongoeshere.
*horFirstnameLastname
*accordancewiththetermsofthelicenseagreementyouenteredinto
这天大B问小A:“怎样设计可复用的面向对象软件?”
/*
*(#)/03/18
*ThissoftwareistheconfidentialandproprietaryinformationofSun
*withSun.
*/
/**
*901SanAntonioRoad,PaloAlto,California,94303,www.youxs.org.
*Allrightsreserved.
*classVar2documentationmentthathappenstobe
*morethanonelinelong
*Microsystems,Inc.(“ConfidentialInformation”).Youshallnot
*disclosesuchConfidentialInformationandshalluseitonlyin
*Copyright(c)1994-1999SunMicrosystems,Inc.
其他人正在读 :【凡人修仙:从废灵根开始】【玄幻:我重瞳者,开局人生模拟器】【万倍返还,为师举世无敌】【因人而异的系统】【道爷要飞升】【四合院之傻子当家】【我们的家族没落了】【从研发易筋经开始登临彼岸】【斗罗:人在绝世,赝品神灵】【诸天从小阴间开始】【长生从猎户开始】【末世之世纪轮回】【哲学家们都干了些什么?】【神农道君】【开局在出租屋里捡到一个亿】【不眠春潮】【玄幻:我是大反派】【从自创魂环开始的斗罗】【昭奚旧草】【流浪诸天的剑客】【爱的饥渴】【被反派鳏夫盯上了】【摆烂太狠,我被宗门当反面教材了】【该给世界上上强度了】【这个诡异三国游戏太凶残了】【烽火从壮士出川开始】【影视:流窜在诸天的收集员】【直播被剧透历史的千古一帝,今天也很尴尬】【今天也没能扬帆起航】【末世:从加点开始无限进化】