it compiles fine but when i go to run the program the only output is "Cut Shampoo" and the program ends. Any help will be greatly appreciated i need to have this finished soon.

Create a class for services offered by a hair-styling salon. Data fields include a String to hold the service description (for example, “Cut”, “Shampoo”, or “Manicure”), a double to hold the price, and an integer to hold the average number of minutes it takes to perform the service. The class name is Service. Include a constructor that requires arguments for all three data fields and three get methods that each return statement one of the data field’s values.
Write an application named SalonReport that contains an array to hold six Service objects and fill it with the data from the above table. Include methods to sort the array in ascending order by price of service, time it takes to perform the service, and in alphabetical order by service description.
Prompt the user for the preferred sorting method, and offer three choices; sort by description, price, or time. Depending on the user’s input, display the results.
Save the files as and

public class Service   
//parameters declartions   
String servDescript;   
double price;   
int avgMin;   
// constructor for Service   
public Service(String s, double p, int m)   
servDescript = s;   
price = p;   
avgMin = m;   
//get Methods to return service description, price, and average   
       // minutes to perform services   
public String getServiceType()   
return servDescript;   
public double getPrice()   
return price;   
public int getMinutes()   
return avgMin;   
public class SalonReport   
  public static void main(String[] args)

     Service[] myService = new Service[6];
     myService[0] = new Service("Cut",8.00,15);
     myService[1] = new Service("Shampoo",4.00,10);
     myService[2] = new Service("Manicure",18.00,30);
     myService[3] = new Service("Style",48.00,55);
     myService[4] = new Service("Permanent",18.00,35);
     myService[5] = new Service("Trim",6.00,5);
      System.out.println(myService[0].getServiceType()+ " " +   
   public static void SortDescription(Service[] array,int len)   
      int a;   
      int  b;   
      Service temp;   
      for(a= 0; a < len; ++a)   
      for (b= 0;b < len-1;++b)   
         if (array[b].getServiceType().compareTo (array[b +1].getServiceType())> 0);   
               temp = array[b];   
               array[b] = array[b+1];   
               array[b+1] = temp;   
This article has been dead for over six months. Start a new discussion instead.