【发布时间】:2011-04-20 14:23:21
【问题描述】:
我来自俄罗斯。英语不是我的母语:) 我试图理解这项任务,但我不能确保我正确理解它。
请纠正我。
class DE_Roman
{
private String romanValue;
private int intValue;
public void romanToInt(Strin romanValue)
{
this.romanValue = romanValue;
int result;
// ...
// convert to int and save result in result variable
this.intValue = result;
}
public void intToRoman(int intValue)
{
this.intValue = intValue;
String result = "";
// ...
// convert to int and save result in result variable
this.romanValue = result;
}
public void println()
{
System.out.println( this.toString() );
}
public String toString()
{
return romanValue + " " + intValue;
}
}
对吗????
关于getInput 我不明白......什么和在哪里......
【问题讨论】:
-
欢迎来到 Stack Overflow,@johnson!我们的系统包含一个功能强大、易于使用的文本/代码格式化程序。查看概览here;通过单击每个帖子条目/编辑框右上角的颜色鲜艳的问号图标可以访问该页面。请在以后的帖子中使用格式化程序,以便我们更容易理解您的问题并为您提供帮助。我会为你修好这个。 (实际上,看起来@justkt 在我写这篇文章时为你做了。)
-
这是作业吗?您是在询问您的程序是否与链接中的任务描述相匹配?
-
关于任务:类似的。我试图理解这两个类的功能。
标签: java roman-numerals