I'm writing a little program in scala that would simulate a doctors practice. One of the requirements is that a user can set consultations with a doctor. I have implemented a solution that gives you the consultation object if you succeed and also prints a message saying that the action was successful.
This is where a little "bug" (more a minor but annoying inconveniece) appears. When I tell my scala worksheet to make a new variable like so:
var consultation: Consultation = patient.makeConsultation(x, y, z)
Well this works perfectly BUT the message that it should print is printed at the top of the output window and not at the point in the worksheet were the variable is actually created. Does anyone know a solution for this?
Thanks in advance.