Skip to content

Instantly share code, notes, and snippets.

Created December 17, 2010 10:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save valo/744760 to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
import java.util.List;
public class School {
private List<SchoolClass> m_classes = new ArrayList<SchoolClass>();
private List<SchoolRoom> m_rooms = new ArrayList<SchoolRoom>();
public School() {
public void addSchoolClass(SchoolClass schoolClass) {
public void addSchoolRoom(SchoolRoom room) {
public List<SchoolClass> getSchoolClasses() {
return m_classes;
public List<SchoolRoom> getSchoolRooms() {
return m_rooms;
public void print() {
System.out.println("School info:");
System.out.println(" Classes:");
for (SchoolClass schoolClass : m_classes) {
System.out.println(" Rooms:");
for (SchoolRoom schoolRoom : m_rooms) {
Copy link

skanev commented Dec 17, 2010

Oh, nice. Hungarian notation. Haven't seen that in a while :)

Copy link

valo commented Dec 20, 2010

Hehe. Just an example for a friend for his programming homework ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment