please make uml diagram, pseudocode and flowchart thank you
import java.io.*;
import java.util.*;
class NumberFormat {
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
System.out.print(“Enter a binary string:”);
String binaryString = scan.next();
System.out.print(bin2Dec(binaryString) != 0 ?bin2Dec(binaryString) + “n” : “”);
}
public static int bin2Dec(String binaryString) {
int res = 0;
try {
res = Integer.parseInt(binaryString, 2);
} catch (NumberFormatException e) {
System.out.println(“Not a binary string.”);
}
return res;
}
}
Expert Answer
An answer will be send to you shortly. . . . .