java - Writing and reading inherited objects from a file with bufferred reader -


i writing librarian admin program , have 2 classes: members , premium members. there no real difference other fact premium members can take out 5 books opposed 3. using buffered reader , writer read these items wonderring how (or if can @ all) read , write both objects single .txt file?

here's code have far:

member class

public string tostring(int i) {     string stg = "";     stg += memid + "#" + name + "#" + surname + "#" + address + "#" + email + "#" + cellnum + "#" + num + "#" + accnttyp + "#" + pass + "#" + book1 + "#" + book2 + "#" + book3 + "#";     return stg; } 

i have yet premium members class (wanted answer while it) pretty same exception of 2 books.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -