我工作的一個項目,並具有以下僞代碼:幫助創建一個私有方法
// create a private method, getIntValDialog, that returns an integer value and accepts
// two string values as arguments
// declare and initialize a string variable, sValue, to an empty string
// Accept input to sValue from a Input Dialog using smessage, stitle, and a question icon as arguments
// return the integer converted value of sValue
// end getIntValDialog method
我有一個想法,但我不太明白如何正確設置它。僞代碼告訴我我必須做什麼,但我只需要一些幫助理解和可視化這是如何工作的。任何幫助,將不勝感激:)
我想標記這是家庭作業 - 它肯定有這種感覺。來自一位從來沒有寫過代碼謀生的教授的壞僞代碼,以及無法遵循它的學生。 – duffymo 2010-02-28 03:38:23
你想知道什麼?您應該編寫一個方法,要求用戶輸入,然後將該輸入作爲整數返回。該方法需要2個參數:輸入對話框的標題和消息。愚蠢的僞代碼 – 2010-02-28 03:39:02
家庭作業問題,零背景工作或嘗試提供。對不起,但這是一個-1。 – Urda 2010-02-28 03:43:37