// Micheal Seals.

Added on - 16 Sep 2019

  • 3

    pages

  • 561

    words

  • 98

    views

  • 0

    downloads

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 java.io.*;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(System.in);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’re reading a preview
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Unlock This Document