I am trying to learn programming and started using javafx.
I am now facing a problem which is probably caused by my gaps of knowledge and understanding of java
So far I have created a class as shown below
public class Sheet {
private String material;
private int DimX,DimY;
private double quantity;;
public Sheet(String _material,int _DimX,int _DimY,double _quantity){
material = _material;
DimX =_DimX;
DimY =_DimY;
quantity = _quantity ;
}
public String getMaterial(){return material;}
public void setMaterial(String _material) {material = _material;}
public int getDimX(){return DimX;}
public void setDimX(int _DimX){DimX = _DimX;}
public int getDimY(){return DimY;}
public void setDimY(int _DimY){DimY = _DimY;}
public double getQuantity(){return quantity;}
public void setQuantity(double _quantity) {quantity = _quantity;}
}
The arraylist is created using
List<Sheet> Sheet_list= new ArrayList<>();
Through a bit complicated ui the user enters some data which I take parts of, do some calculations and instantiate new entries to an arraylist of the object (sheet)above using the code similar to the linebelow
Sheet_list.add(new Sheet(string_i, int_x, int_y,double_e));
What I need is to sort this arraylist but I am receiving an error that the class is not abstract and does not override abstract method.
Is there any way to sort an arraylist formed from instantiated user data and not programmatically inserted?
Thank you in advance