开发者

Help with creating a private method [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

I am working on a project and ha开发者_JAVA技巧ve the following psuedocode:

// 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

I have an idea, but I don't quite understand how to set this up properly. The psuedocode tells me what I have to do, but I just need some help understanding and visualizing how this works. Any help would be appreciated :)


Here's what I get out of your pseudo-code:

// create a private method, getIntValDialog, that returns an integer value and accepts 
// two string values as arguments
private int getIntValDialog(String smessage, String stitle)
{
     // declare and initialize a string variable, sValue, to an empty string
     String sValue = "";

     // Accept input to sValue from a Input Dialog using smessage, stitle,
     //  and a question icon as arguments
     // TODO (this is your part of the task)

     // return the integer converted value of sValue
     return Integer.valueOf(sValue);

// end getIntValDialog method
}

You take it from here.

I have an idea, but I don't quite understand how to set this up properly.

Some advice for future questions: If you truly do have an idea, please post it as best you can and let people correct any errors. It'll show good faith effort that you're working.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜