我工作的一个项目,并具有以下伪代码:帮助创建一个私有方法
// 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