CANNOT FIND VARIABLE AND CONTRUCT
I get cannot find symbol textio and symbol romanconverter
I need help to fix this and understand what i did wrong or did not do.
Im trying to write a program that has the user input numbers and the the program outputs roman numbers
I hope that i am close to getting there!
public class RomanConverter{
public static void main(String[] args){
System.out.println("Enter a Roman numeral and I will convert it to an ordinary");
System.out.println("arabic integer. Enter an integer in the range 1 to 3999");
System.out.println("and I will convert it to a Roman numeral. Press return when");
System.out.println("you want to quit.");
while (true) {
System.out.println();
System.out.print("? ");
/* Skip past any blanks at the beginning of the input line.
Break out of the loop if there is nothing else on the line. */
while (TextIO.peek() == ' ' || TextIO.peek() == '\t')
TextIO.getAnyChar();
if ( TextIO.peek() == '\n' )
break;
/* If the first non-blank character is a digit, read an arabic
numeral and convert it to a Roman numeral. Otherwise, read
a Roman numeral and convert it to an arabic numeral. */
if ( Character.isDigit(TextIO.peek()) ) {
int arabic = TextIO.getlnInt();
try {
RomanConverter N = new RomanConverter (arabic);
TextIO.println(N.Int() + " = " + N.String());
}
catch (NumberFormatException e) {
System.out.println("Invalid input.");
System.out.println(e.getMessage());
}
}
else {
String roman = TextIO.getln();
try {
RomanConverter N = new RomanConverter(roman);
System.out.println(N.String() + " = " + N.Int());
}
catch (NumberFormatException e) {
System.out.println("Invalid input.");
System.out.println(e.getMessage());
}
}
} // end while
System.out.println("OK. Bye for now.");
} // end main()
} // end class RomanConverter
[2054 byte] By [
adalou04a] at [2007-10-3 7:01:21]

Here, let me do it!
I get cannot find symbol textio and symbol
romanconverter
I need help to fix this and understand what i did
wrong or did not do.
Im trying to write a program that has the user input
numbers and the the program outputs roman numbers
I hope that i am close to getting there!
public class RomanConverter{
public static void main(String[] args){
System.out.println("Enter a Roman numeral and I will convert it to an ordinary");
System.out.println("arabic integer. Enter an integer in the range 1 to 3999");
System.out.println("and I will convert it to a Roman numeral. Press return when");
System.out.println("you want to quit.");
while (true) {
System.out.println();
System.out.print("? ");
/* Skip past any blanks at the beginning of the
input line.
Break out of the loop if there is
nothing else on the line. */
while (TextIO.peek() == ' ' || TextIO.peek() ==
'\t')
TextIO.getAnyChar();
( TextIO.peek() == '\n' )
break;
/* If the first non-blank character is a
digit, read an arabic
numeral and convert it to a Roman
numeral. Otherwise, read
a Roman numeral and convert it to an
arabic numeral. */
( Character.isDigit(TextIO.peek()) ) {
int arabic = TextIO.getlnInt();
try {
RomanConverter N = new
RomanConverter (arabic);
TextIO.println(N.Int() + " = " +
N.String());
}
catch (NumberFormatException e) {
System.out.println("Invalid input.");
ystem.out.println(e.getMessage());
}
else {
String roman = TextIO.getln();
try {
RomanConverter N = new RomanConverter(roman);
System.out.println(N.String() + " = " +
N.Int());
}
catch (NumberFormatException e) {
System.out.println("Invalid input.");
ystem.out.println(e.getMessage());
}
} // end while
System.out.println("OK. Bye for now.");
} // end main()
} // end class RomanConverter
Have you added the import statement for TextIO?