So I am making a project and I want to create a new clinic.
On my UI we insert all the topics that we need to create the clinic and they must be saved as ArrayList and I am struggling with this method.
this is how i am asking for the input, should i change to a scanner?
laboratoryId = Utils.readLineFromConsole("Enter Clinic Id: ");
class to the array
public class ClinicalAnalysisLabStore{
private ArrayList<ClinicalAnalysisLab> cliniclist;
public ClinicalAnalysisLabStore(){
cliniclist = new ArrayList<>();
}
public ArrayList<ClinicalAnalysisLab> getCliniclist() {
return cliniclist;
}
cals = new ClinicalAnalysisLabStore();
ArrayList<ClinicalAnalysisLab> cliniclist = cals.getCliniclist();
for(ClinicalAnalysisLab cals : cliniclist){
System.out.print(cals.getLaboratoryId()+"\n");
System.out.print(cals.getName()+ "\n");
System.out.print(cals.getAddress()+"\n");
System.out.print(cals.getPhoneNumber()+"\n");
System.out.print(cals.getTinNumber()+"\n");
System.out.print(cals.getTestType()+"\n");
}
Utils.readLineFromConsole("The Operation was a success!");
this is a short cut from my code where i am trying to print the arraylist but it only prints "The Operation was a success!"