Created
September 22, 2016 07:57
-
-
Save tobiballof/614c4825c06b2f5410678304c2b83607 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package vereine; | |
/** | |
* | |
* @author Tobi | |
*/ | |
public class Mitglied { | |
String name; | |
} |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package vereine; | |
import java.util.ArrayList; | |
/** | |
* | |
* @author Tobi | |
*/ | |
public class Verein { | |
String vName; | |
ArrayList<Mitglied> name = new ArrayList<Mitglied>(); | |
} |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package vereine; | |
/** | |
* | |
* @author Tobi | |
*/ | |
public class Vereine { | |
public static void main(String[] args) { | |
Verein verein1 = new Verein(); | |
Mitglied mitglied1 = new Mitglied(); | |
Mitglied mitglied2 = new Mitglied(); | |
mitglied1.name = "Olga"; | |
mitglied2.name = "Frank"; | |
verein1.vName ="DaddelClub"; | |
verein1.name.add(mitglied1); | |
verein1.name.add(mitglied2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment