I need some java programming help from someone to fix the SalonReport below:
[CODE=java]import java.util.Scann er;
import java.util.Array s;
public class SalonReport {
public static void main(String[] args) {
int choice;
Scanner sc = new Scanner(System. in);
Service[] services = new Service[5];
services[0] = new Service("Cut", 8.00, 15);
services[1] = new Service("Shampo o",4, 10);
services[2] = new Service("Manicu re",18,30);
services[3] = new Service("Style" ,48,55);
services[4] = new Service("Perman ent",18,35);
services[5] = new Service("Trim", 6,5);
System.out.prin tln("Enter how you would like the services sorted (1) Description (2) Price (3) Time: ");
choice = sc.nextInt;
//if choice = 1 then sort by description...
//if choice = 2 then sort by price....
//if choice = 3 then sort by Time...
}
}
public class Service {
String description;
double price;
int minutes;
public Service(String d, double p, int m) {
description = d;
price = p;
minutes = m;
}
public String getDescription( ) {
return description;
}
public double getPrice() {
return price;
}
public int getMinutes() {
return minutes;
}
}[/CODE]
[CODE=java]import java.util.Scann er;
import java.util.Array s;
public class SalonReport {
public static void main(String[] args) {
int choice;
Scanner sc = new Scanner(System. in);
Service[] services = new Service[5];
services[0] = new Service("Cut", 8.00, 15);
services[1] = new Service("Shampo o",4, 10);
services[2] = new Service("Manicu re",18,30);
services[3] = new Service("Style" ,48,55);
services[4] = new Service("Perman ent",18,35);
services[5] = new Service("Trim", 6,5);
System.out.prin tln("Enter how you would like the services sorted (1) Description (2) Price (3) Time: ");
choice = sc.nextInt;
//if choice = 1 then sort by description...
//if choice = 2 then sort by price....
//if choice = 3 then sort by Time...
}
}
public class Service {
String description;
double price;
int minutes;
public Service(String d, double p, int m) {
description = d;
price = p;
minutes = m;
}
public String getDescription( ) {
return description;
}
public double getPrice() {
return price;
}
public int getMinutes() {
return minutes;
}
}[/CODE]
Comment