Created
November 19, 2018 16:00
-
-
Save alexlarkou/635733f5f8c21ef454ce1469d12559b4 to your computer and use it in GitHub Desktop.
Example
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
public class School { | |
private final String _name; | |
private final Stream<Student> _students; | |
public School(String schoolName, Stream<Student> students){ | |
_name = schoolName; | |
_students = students; | |
} | |
public String get_name() { | |
return _name; | |
} | |
public Stream<Student> get_students() { | |
return _students; | |
} | |
public void set_address(String test_address) { | |
// set imaginary address | |
} | |
} |
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
public class Student { | |
private final String _name; | |
private final int _year; | |
private final int _height; | |
public Student(String name, int year, int height) { | |
_name = name; | |
_year = year; | |
_height = height; | |
} | |
public int get_year() { | |
return _year; | |
} | |
public String get_name() { | |
return _name; | |
} | |
public int get_height() { | |
return _height; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment