-
-
Save uncoded-ro/b8a6cd9fb3ae7ba73777d687861dda72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ro.virtualcampus.map; | |
import java.util.*; | |
import ro.virtualcampus.person.Student; | |
public class CatalogMap { | |
private String anStudiu; | |
private HashMap<String, Student> studenti; | |
public CatalogMap(String anStudiu) { | |
this.anStudiu = anStudiu; | |
this.studenti = new HashMap<String, Student>(); | |
} | |
public String getAnStudiu() { | |
return this.anStudiu; | |
} | |
public void setAnStudiu(String anStudiu) { | |
this.anStudiu = anStudiu; | |
} | |
public HashMap<String, Student> getStudenti() { | |
return this.studenti; | |
} | |
public void setStudenti(HashMap<String, Student> studenti) { | |
this.studenti = studenti; | |
} | |
public void afisareStudenti() { | |
System.out.println("anul de studiu " + this.anStudiu + " are " + | |
this.studenti.size() + " studenti"); | |
System.out.println(this.studenti); | |
} | |
public void transferStudenti(HashMap<String, Student> studenti) { | |
this.studenti.putAll(studenti); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment