Hi all, wonder if you could help me with this?
I'm trying to compile this:
public class SortSoftwareProject
{
public static void main(String[] args)
{
SoftwareProject[] aProject = new SoftwareProject[6];
aProject[0] = new SoftwareProject("IBM", 'D', 'M');
aProject[1] = new SoftwareProject("Microsoft", 'C', 'M');
aProject[2] = new SoftwareProject("Apple", 'Q', 'L');
aProject[3] = new SoftwareProject("Intel", 'C', 'L');
aProject[4] = new SoftwareProject("Me", 'S', 'D');
aProject[5] = new SoftwareProject("You", 'M', 'Q');
bubbleSort(aProject);
for(int i = 0; i < aProject.length; i++)
System.out.print(aProject.getCustomerName());
}
And this is the class I created.
public class SoftwareProject
{
private String custName;
private char projName;
private char serType;
private double projCost = 10000;
public void SoftwareProject(String inputName, char inputProjectName, char serviceTypeName)
{
custName = inputName;
projName = inputProjectName;
serType = serviceTypeName;
}
public char getProjectName()
{
return projName;
}
public char getServiceType()
{
return serType;
}
public String getCustomerName()
{
return custName;
}
public double getProjectCost()
{
return projCost;
}
}
Basicly, creating an array of projects to be bubble sorted by customer name.
I have the method for the bubble sort, but I'm getting this compilation error:
required: no arguments
found: String,char,char
reason: actual and formal argument lists differ in length
SortSoftwareProject.java:11: error: constructor SoftwareProject in class Softwar
eProject cannot be applied to given types;
aProject[5] = new SoftwareProject("You", 'M', 'Q');
^
required: no arguments
found: String,char,char
reason: actual and formal argument lists differ in length
SortSoftwareProject.java:22: error: constructor SoftwareProject in class Softwar
eProject cannot be applied to given types;
temp = new SoftwareProject("word", 'a', 'b');
^
Anyone spot what I'm doing wrong?