I have a few problems when attempting to create a java program that will read an address from various inputs and printed to a standard output. Can anyone help? I'm supplying the code from Address.java that needs to be modified as I'm unsure. N.B part 1, which just takes the address and outputs it to whatever is required e.g. text file has already been done and is fine.
If possible, an explanation of what has been modified would be much appreciated - as I have stated in previous posts my programming isn't great and I merely want to get to a stage where I myself am confident in my own work.
//{ //System.out.println("Invalid range entered");
//}
}
}
}
ADDRESS.JAVA
public void writeData(DataOutputStream out) throws IOException { // Replace this comment and the next line with your code. out.writeBytes(toString()); }
/** * Replace me with documentation. */ public static Address readData(DataInputStream in) throws IOException { // Replace this comment and the next lines with your code. System.err.println("** Address.readData() - NOT WRITTEN YET **");
// Blank address so can compile code. // Your address will need some data! Address me = new Address();
// Must return the Address that has just been read. return me; }