Compare commits

6 Commits

Author SHA1 Message Date
daf0ec541d getAnzahlEinwohner implementiert 2022-12-06 14:22:27 +01:00
268f4eee43 renamed Main to EinkommenInfo 2022-12-06 14:01:59 +01:00
a2bd838467 Gebiet 2022-12-06 13:54:40 +01:00
78dfa848fa Merge pull request 'Add: GebietsDatei fixed #6' (#8) from readfile into master
Reviewed-on: #8
2022-12-02 15:13:55 +01:00
pbs2h21asc
2562126caa Gebietliste 2022-12-02 15:10:14 +01:00
9c6592fbff GebietsListe Methoden 2022-12-02 15:07:08 +01:00
4 changed files with 50 additions and 4 deletions

10
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
</set>
</option>
</component>
</project>

View File

@@ -1,4 +1,4 @@
public class Main { public class EinkommenInfo {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Hello world!"); System.out.println("Hello world!");
} }

View File

@@ -1,4 +1,3 @@
public class Gebiet implements GebietInterface{ public class Gebiet implements GebietInterface{
private int jahr; private int jahr;
private int schlüssel; private int schlüssel;
@@ -31,16 +30,22 @@ public class Gebiet implements GebietInterface{
@Override @Override
public long getGesamtEinkommen() { public long getGesamtEinkommen() {
if(gesamtEinkommen <= 0){
return -1;
}
return gesamtEinkommen; return gesamtEinkommen;
} }
@Override @Override
public int getDurchschnittsEinkommen() { public int getDurchschnittsEinkommen() {
if(durchschnittsEinkommen <= 0){
return -1;
}
return durchschnittsEinkommen; return durchschnittsEinkommen;
} }
@Override @Override
public int getAnzahlEinwohner() { public int getAnzahlEinwohner() {
return 0; return (int)(gesamtEinkommen / durchschnittsEinkommen);
} }
} }

View File

@@ -1,3 +1,34 @@
public class GebietsListe { import java.util.ArrayList;
import java.util.List;
public class GebietsListe {
private List<GebietMock> gebietListe = new ArrayList<>();
public GebietsListe(){
this.gebietListe = gebietListe;
}
public Gebiet getGebietMinDurchschnittEinkommen(){
return null;
}
public Gebiet getGebietMaxEinwohner(){
return null;
}
public int getAnzahlGesamt(){
return 0;
}
public int getAnzahlUnvollstaendig(){
return 0;
}
public List<Gebiet> getGebietNachNamen(String namensanfang){
return null;
}
} }