@@ -0,0 +1,2962 @@
+/*%0ATeam    :   Fancy Team 1%0AMembers :   Jason Andre, Nicholas Blum, Jordan Mincey, Ben Nowak%0AAssignment  :   Third normal form of Book data from spreadsheet data%0A*/%0Apackage bookdata;%0A%0Aimport java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.io.FileWriter;%0Aimport java.util.AbstractMap;%0Aimport java.util.HashMap;%0Aimport java.util.HashSet;%0Aimport java.util.Map;%0Aimport java.util.Scanner;%0Aimport java.util.Set;%0A%0A/**%0A *%0A * @author Ben Nowak %3Cbnowak1@unca.edu%3E%0A */%0Apublic class BookData %7B%0A    public String title;%0A    public int isbn;%0A    public String fName;%0A    public String lName;%0A    public String pubName;%0A    public String pubAddr;%0A    public int totalCopiesOrdered;%0A    public int totalCopiesInStock;%0A    public String pubDate;%0A    public String catName;%0A    public double price;%0A    public double cost;%0A    %0A    public BookData(String filename) throws Exception %7B%0A        File file = new File(filename);%0A        FileWriter bookInfo = new FileWriter(%22book.csv%22);%0A        FileWriter authorInfo = new FileWriter(%22author.csv%22);%0A        FileWriter categoryInfo = new FileWriter(%22category.csv%22);%0A        FileWriter publisherInfo = new FileWriter(%22publisher.csv%22);%0A        FileWriter authorListInfo = new FileWriter(%22authorlist.csv%22);%0A        %0A        int bookId = 1, categoryId = 1, pubId = 1, authorId = 1;%0A        int lastWroteISBN = 0;%0A        %0A        Set%3CString%3E category = new HashSet%3C%3E();%0A        Set%3CString%3E publishers = new HashSet%3C%3E();%0A        Map%3CString, Integer%3E catMap = new HashMap%3C%3E();%0A        Scanner sc = new Scanner(file);%0A        %0A        while(sc.hasNextLine())%7B%0A            String%5B%5D tokens = new String%5B12%5D;%0A            tokens = sc.nextLine().split(%22,%22);%0A            for(int i=0; i%3Ctokens.length; i++)%7B%0A                tokens%5Bi%5D.trim();%0A            %7D%0A            title = tokens%5B0%5D;%0A            isbn = Integer.parseInt(tokens%5B1%5D);%0A            fName = tokens%5B2%5D;%0A            lName = tokens%5B3%5D;%0A            pubName = tokens%5B4%5D;%0A            pubAddr = tokens%5B5%5D;%0A            totalCopiesOrdered = Integer.parseInt(tokens%5B6%5D);%0A            totalCopiesInStock = Integer.parseInt(tokens%5B7%5D);%0A            pubDate = tokens%5B8%5D;%0A            catName = tokens%5B9%5D;%0A            cost = Double.parseDouble(tokens%5B11%5D);%0A            %0A            if(catMap.containsKey(catName))%7B%0A                catMap.put(catName, categoryId);%0A                categoryInfo.write(%22%22 + categoryId++ + %22, %22 + catName + %22%5Cn%22);%0A            %7D%0A            %0A            authorInfo.write(%22%22 + authorId++ + %22, %22 + fName + %22, %22 + lName + %22%5Cn%22);%0A            categoryInfo.write(%22%22 + categoryId + %22, %22 + catName + %22%5Cn%22);%0A            publisherInfo.write(%22%22 + pubId++ + %22, %22 + pubName + %22, %22 + pubAddr + %22%5Cn%22);%0A            authorListInfo.write(%22%22 + isbn + %22, %22 + categoryId++ + %22%5Cn%22);%0A        %7D%0A        %0A    %7D%0A    /**%0A     * @param args the command line arguments%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        // TODO code application logic here%0A        %0A    %7D%0A    %0A%7D%0A

Create BookData.java