Merge remote-tracking branch 'origin/master'
This commit is contained in:
		@@ -26,12 +26,36 @@ public class GebietListe implements ListenInterface
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    public Gebiet getGebietMinDurchschnittsEinkommen()
 | 
					    public Gebiet getGebietMinDurchschnittsEinkommen()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        int einkommen1 = 0;
 | 
				
			||||||
 | 
					        int minDurchschnitt = 0;
 | 
				
			||||||
 | 
					        Gebiet g = null;
 | 
				
			||||||
 | 
					        for (Gebiet gebiet : gebiete)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            einkommen1 = gebiet.getDurchschnittsEinkommen();
 | 
				
			||||||
 | 
					            if (einkommen1 < minDurchschnitt)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                minDurchschnitt = einkommen1;
 | 
				
			||||||
 | 
					                g = gebiet;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return g;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public Gebiet getGebietMaxAnzahlEinwohner()
 | 
					    public Gebiet getGebietMaxAnzahlEinwohner()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        int einwohner = 0;
 | 
				
			||||||
 | 
					        int maxEinwohner = 0;
 | 
				
			||||||
 | 
					        Gebiet e = null;
 | 
				
			||||||
 | 
					        for (Gebiet gebiet : gebiete)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            einwohner = gebiet.getAnzahlEinwohner();
 | 
				
			||||||
 | 
					            if (einwohner > maxEinwohner)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                maxEinwohner = einwohner;
 | 
				
			||||||
 | 
					                e = gebiet;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return e;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public int getAnzahlGesamt()
 | 
					    public int getAnzahlGesamt()
 | 
				
			||||||
@@ -48,6 +72,4 @@ public class GebietListe implements ListenInterface
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,7 +15,7 @@ import java.util.List;
 | 
				
			|||||||
public class GebietsDatei implements GebietsQuelle{
 | 
					public class GebietsDatei implements GebietsQuelle{
 | 
				
			||||||
    private ArrayList<Gebiet> gebiete = new ArrayList<>();
 | 
					    private ArrayList<Gebiet> gebiete = new ArrayList<>();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public void GebietsDatei (String dateiname){
 | 
					    public GebietsDatei (String dateiname){
 | 
				
			||||||
        Path pfad = Paths.get(dateiname);
 | 
					        Path pfad = Paths.get(dateiname);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        try {
 | 
					        try {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,3 @@
 | 
				
			|||||||
import java.util.ArrayList;
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user