Skip to content

Instantly share code, notes, and snippets.

@Fundibalus
Created April 12, 2016 20:29
Show Gist options
  • Save Fundibalus/9d008a14c49be62a2ce7b748044588c1 to your computer and use it in GitHub Desktop.
Save Fundibalus/9d008a14c49be62a2ce7b748044588c1 to your computer and use it in GitHub Desktop.
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Haus {
Moebel lieblingsmoebel;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Kontinent {
Land lieblingsland;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Land {
Region lieblingsregion;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Matroschka {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Universum Milchi = new Universum();
Milchi.name = "Milchi";
Planet Erde = new Planet();
Erde.name = "Erde";
Kontinent Europa = new Kontinent();
Europa.name = "Europa";
Land Deutschland = new Land();
Deutschland.name = "Deutschland";
Region Saarland = new Region();
Saarland.name = "Saarland";
Stadt Voelklingen = new Stadt();
Voelklingen.name = "Voelklingen";
Strasse Merkurstrasse = new Strasse();
Merkurstrasse.name = "Merkurstrasse";
Haus hausneunzehn = new Haus();
hausneunzehn.name = "neunzehn";
Moebel dievonikea = new Moebel();
dievonikea.name = "dievonikea";
Tisch tisch1 = new Tisch();
tisch1.name = "tisch1";
Milchi.lieblingsplanet = Erde;
Erde.lieblingskontinent = Europa;
Europa.lieblingsland = Deutschland;
Deutschland.lieblingsregion = Saarland;
Saarland.lieblingsstadt = Voelklingen;
Voelklingen.lieblingsstrasse = Merkurstrasse;
Merkurstrasse.lieblingshaus = hausneunzehn;
hausneunzehn.lieblingsmoebel = dievonikea;
dievonikea.lieblingstisch = tisch1;
}
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Moebel {
Tisch lieblingstisch;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Planet {
String name;
Kontinent lieblingskontinent;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Region {
Stadt lieblingsstadt;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Stadt {
Strasse lieblingsstrasse;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Strasse {
Haus lieblingshaus;
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Tisch {
String name;
}
/*
* 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 matroschka;
/**
*
* @author Marlon
*/
public class Universum {
String name;
Planet lieblingsplanet;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment