Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 1 of 3 pages
// Micheal Seals// IT 2650, Java Programing 85072// Due Date: November 17 2016// Asssignment 7import java.nio.file.*;import*;import java.nio.channels.FileChannel;import java.nio.ByteBuffer;import static java.nio.file.StandardOpenOption.*;import java.util.Scanner;import java.text.*;public class CreateFilesBasedOnState{public static void main(String[] args){Scanner input= new Scanner(;Path inStateFile=Paths.get("InStateCusts.txt");Path outOfStateFile= Paths.get("OutOfStateCusts.txt");final String ID_FORMAT= "000";final String NAME_FORMAT= " ";final int NAME_LENGTH= NAME_FORMAT.length();final String HOME_STATE= "WI";final String BALANCE_FORMAT= "0000.00";String delimiter= ",";String s= ID_FORMAT + delimiter + NAME_FORMAT + delimiter + HOME_STATE +delimiter +BALANCE_FORMAT + System.getProperty("line.separator");final int RECSIZE=s.length();FileChannel fcIn= null;FileChannel fcOut= null;String idString;int id;String name;String state;double balance;final String QUIT="999";
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access