package javaphone;

import java.util.ArrayList;
import java.util.HashMap;

/**
 *
 * @author iGroup
 */
public class ServiceList extends ArrayList<HashMap> {
    private final DataFileIO serviceDataFile;
    
    public ServiceList() {
        serviceDataFile = new DataFileIO("services.xml", "services", "service");
        this.addAll(serviceDataFile.read());
    }

    public double getServicePrice(Service service) {
        return 0;
    }

    public boolean setServicePrice(Service service, double price) {
        return false;
    }

}

@@ -74,17 +74,110 @@
 %0A%0A/**%0A *
+ This class handles the service information when %0A * searching for the service id number.%0A * 
 %0A
-
  * @auth
@@ -244,16 +244,21 @@
 hMap%3E %7B%0A
+    %0A
     priv
@@ -296,24 +296,77 @@
 aFile;%0A    %0A
+    /**%0A     * Adds service to the datafile.%0A     */%0A
     public S
@@ -521,146 +521,345 @@
     
-public double getServicePrice(Service service) %7B%0A        return 0;%0A    %7D%0A%0A    public boolean setServicePrice(Service service, double price
+/**%0A     * Searches for service with specific serviceId%0A     * @param serviceId%0A     * @return service data as HashMap if service found %0A     *         null if service not found%0A     */  %0A    public HashMap getServiceById(int serviceId) %7B%0A        for (HashMap service : this) %7B%0A            if (serviceId == (int) service.get(%22serviceId%22)
 ) %7B%0A
@@ -870,27 +870,85 @@
     
+ 
-return false;%0A    %7D%0A
+       return service;%0A            %7D%0A        %7D%0A        return null;%0A    %7D    
 %0A%7D%0A

Update ServiceList.java