0

How to solve the First Question?

The following is the ADTs of Doctor. Complete the Doctor object class: public class Doctor{ private String docName; private char docSpecialty; private int docYearService; . . . } Use own defined array list class (MyArrayList), write an application program to solve the task below: a) Create an MyArrayList object named doctorList. Can someone help me for this type of question? I am stuck with the first question but the rest question, I understand and know how to solve it. I just dont understand the first question only. Is the first question ask me to make 2 object which are Doctor object and MyArrayList object for one application program?? Any help will be appreciates. Thank you.

19th Mar 2019, 6:59 AM
Intan Zulaikha Faz
Intan Zulaikha Faz - avatar
1 Answer
+ 3
First I suggest to review the tutorial on arraylist: https://www.sololearn.com/learn/Java/2179/ The Doctor class defines the data structure and you would have to create a list of doctors, maybe something like this: ArrayList<Doctor> doctors = new ArrayList<Doctor>();
23rd Mar 2019, 11:26 AM
Tibor Santa
Tibor Santa - avatar