how write an school members? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

how write an school members?

think we have an school with some teachers and students, students belongs to teachers, mean each teacher has some students. each member(teachers and students have ID). how to write this code, in final we want to add/ remove teacher and student and save this names and ID to a file and read it(we need to save members to a file). need have Arraylist or HashMap Or other objects?

22nd May 2017, 7:20 PM
hamid
hamid - avatar
8 Answers
+ 1
I suggest you make a class for student and one for teachers and and give then there functionality I would not assign the students to a teacher but would make another class group class to link teachers and students in a class group you give this class group methods to add and remove the members you like or to make new objects ( teachers or students or class groups) next you make a engine class to write the object to a file and read them from a file I suggest writing the whole class group data to the file so you have one like for every class group object
23rd May 2017, 1:55 PM
LDK
LDK - avatar
+ 1
sure but I hate to do it on sololearn you mind Skype or something ?
23rd May 2017, 5:33 PM
LDK
LDK - avatar
+ 1
sorry for the late response I will need your real Skype name cause your email won't wokr
24th May 2017, 2:53 PM
LDK
LDK - avatar
+ 1
ok, so give me your skype name
25th May 2017, 11:41 PM
hamid
hamid - avatar
+ 1
muis192 contact me there and everybody else who might read this feel free to contact me for questions
26th May 2017, 4:41 AM
LDK
LDK - avatar
0
thank you LDK, can help with code?
23rd May 2017, 5:29 PM
hamid
hamid - avatar
0
yes, I'm with this on skype: [email protected]
23rd May 2017, 7:25 PM
hamid
hamid - avatar
0
please help me on skype
24th May 2017, 1:15 PM
hamid
hamid - avatar