發信人Contactman.bbs@bbs.badcow.com.tw (上B只為剿小白出氣!),
看板Programming
標 題Re: contactman尊重別人好嗎
發信站不良牛牧場 (Tue Mar 21 00:22:16 2006)
轉信站ptt!ctu-reader!Spring!news.nctu!news.ntu!bbs.ee.ntu!zoonews.ee.ntu!Sim
※ 引述《andygogo@kkcity.com.tw ()》之銘言:
: 我知道你會上來看文,可以請你尊重別人好嗎
: 不要把你的優越感,建立在於辱罵我身上
: 我強調,真的是惹火我了,管他三七二十一,偵信社一查什麼都出來了
: 什麼ip不ip的,我不會講明啦,你聽懂就行了
: 我是聰明人,學壞過,但現在賺錢養自已非常夠用,壞路不可走
你不是想學物件導向的程式嗎?
我就寫個範例讓你了解一下.
Class BBSguy
{
mnIQ = 100; //For normal human
mnEQ = 100; //For normal human
public void Post(Article oQuestion) {
if (oQuestion.CanBeGoogle()) {
mnIQ = mnIQ - 10;
}
if (oQuestion.IsChallenge()) {
mnEQ = mnEQ - 10;
}
}
public bool IsSmartGuy() {
return (mnIQ > 50);
}
public bool HasBeenMistake() {
return !(IsSmartGuy);
}
public static Article MakeChallenge() {
return Article.MakeAngryGarbage();
}
}
---------------------------------------------------
BBSguy andygogo = new BBSguy();
Article oQuestion = Google.GetFAQ();
while(andygogo.IsSmartGuy())
{
andygogo.Post(oQuestion);
if (oQuestion.GetResponseCount < 1)
{
andygogo.Post(BBSguy.MakeChallenge());
}
}
System.out.printf(" Is Andygogo a smart boy? " +
(Andygogo.IsSmartGuy()) ? "Yes!" : "No!");
這就是用物件導向的方式描述你正在做的事情.
研究一下程式跑完輸出值是什麼吧....別說我沒有教你.
(嘿, 沒想到我還真閒~~)
: 但你不要再用言語傷害我,我會反擊的
: a piece of cake ,你要擴大事情,嚴重性請你自已付責
: 我真的很想看看你是哪號人物
: PO問題就是po問題,就算你認為是笨蛋問題,哪留給你眼中的笨蛋來問答
: 不過我會看不起你
--
╭──── Origin:
<不良牛牧場> bbs.badcow.com.tw (210.200.247.200)─────╮
│ ↘ Welcome to SimFarm BBS -- From : [220.138.47.8] │
╰◣◣◢ ◢◢《不良牛免費撥接→電話:40586000→帳號:zoo→密碼:zoo》 ◣◣◢ ─╯
推 UNARYvvv:= =真閒,這有趣 03/21 02:49
推 godfat:XDDDD 03/21 03:04
推 yzfr6:這位聯絡人大大還是閒啊! 寫一個對方看不懂的東西幹麻 03/30 22:00