constructor Patient in class Patient cannot be applied to given types;
Patient aPatient = new Patient(bloodType, rhFactor, ID, age);
required: no arguments
reason: actual and formal argument lists differ in length
And I'm not understanding how that's possible when it calls for 2 strings and 2 ints and that's what I am passing. Does anyone have any ideas?
I have this in my main method
And then here are my two constructors, one default and one overloaded.
Michaell Sam wrote:Alright guy's I deleted a lot of corrupt files of this program and then I don't know I moved around a lot of stuff but now it works! I am still confused as to what exactly happened to make everything corrupt but it's whatever I guess. Thanks for trying to help me out!!
IDE's can sometimes get confused.
It's why there's usually a "Clean and Build" option...
That no‑arguments constructor is positively dangerous. You don't only use constructors to allow instantiation of classes, but also to restrict it. The 4‑arguments constructor tell people you need 4 arguments to create an object. The 0‑arguments constructor tells users you can easily guess the blood group and kill the patient. I hope you will understand why I think that constructor should be delete.