/**
 * @author David Manouchehri
 *         Created on 8/6/15 at 4:50 PM.
 *         All content is under the MIT License unless otherwise specified.
 *         See LICENSE.txt for details.
 *
 *         Page 356, Question P7.16
 */
public class HotelSales {
    public static void main(String[] args) {

    }
}

@@ -1,8 +1,94 @@
+import java.io.File;%0Aimport java.io.FileNotFoundException;%0Aimport java.util.Scanner;%0A%0A
 /**%0A * @
@@ -381,18 +381,1699 @@
 %5D args) 
-%7B%0A
+throws FileNotFoundException %7B%0A        String filename = args%5B0%5D;%0A        System.out.println(%22Opening %22 + filename + %22...%22);%0A%0A        try %7B%0A            Scanner inFile = new Scanner(new File(filename));%0A%0A            HotelSales holder = new HotelSales();%0A%0A            holder.setServiceType(%22test1%22);%0A            System.out.println(holder.getServiceType());%0A            holder.addServiceIncome(32.34);%0A            System.out.println(holder.getServiceIncome());%0A%0A            while (inFile.hasNextLine()) %7B%0A                holder.setServiceType(%22test2%22);%0A                String%5B%5D split = splitter(inFile.nextLine());%0A%0A                if(split.length != 4) %7B%0A                    System.out.print(%22Error in file format.%22);%0A                    break;%0A                %7D%0A%0A                System.out.println(holder.getServiceType());%0A                System.out.println(holder.getServiceIncome());%0A            %7D%0A        %7D%0A        catch (FileNotFoundException e) %7B%0A            System.out.println(%22File not found.%22);%0A        %7D%0A    %7D%0A    public static String%5B%5D splitter(String line) %7B%0A        String splitter = %22;%22;%0A        return line.split(splitter);%0A    %7D%0A%0A    private String serviceType;%0A    private double serviceIncome = 0;%0A%0A    public void setServiceType(String serviceType) %7B%0A        this.serviceType = serviceType.toUpperCase();%0A    %7D%0A    public void setServiceIncome(double serviceIncome) %7B%0A        this.serviceIncome = serviceIncome;%0A    %7D%0A    public void addServiceIncome(double serviceIncome) %7B%0A        this.serviceIncome += serviceIncome;%0A    %7D%0A    public String getServiceType() %7B%0A        return serviceType;%0A    %7D%0A    public double getServiceIncome() %7B%0A        return serviceIncome;
 %0A    %7D%0A%7D

Work in progress, lots to still be done.