@@ -0,0 +1,1744 @@
+import java.util.Scanner;%0D%0Apublic class SenatorSim%0D%0A%7B%0D%0A    Scanner sc;%0D%0A    %0D%0A    public SenatorSim () %7B%0D%0A        sc = new Scanner(System.in); //scanner for text input%0D%0A    %7D%0D%0A    %0D%0A    public static void main( String%5B%5D args)%0D%0A    %7B%0D%0A        SenatorSim ss = new SenatorSim ();%0D%0A        ss.processCommandLoop();%0D%0A    %7D%0D%0A    %0D%0A    //have the user input a number%0D%0A    //if the number is a type of district, return that number%0D%0A    //else return -1%0D%0A    //TODO%0D%0A    //exception handling%0D%0A    int getDistrictFromUser () %7B%0D%0A        System.out.println(%22Please enter type of district you want (1-3), or 0 to exit%22);%0D%0A        int type = sc.nextInt();%0D%0A        %0D%0A        if (type == 0) %7B%0D%0A            System.exit(0);%0D%0A            return -1;%0D%0A        %7D%0D%0A        %0D%0A        else if (type %3E 0 && type %3C 4) %7B%0D%0A            return type;%0D%0A        %7D%0D%0A        %0D%0A        else%0D%0A            return -1;%0D%0A        %0D%0A    %7D%0D%0A    %0D%0A    //create a district and initialize all of the fields%0D%0A    %0D%0A    //Here I set all the pop budget and death based on the dType, this is all done in the district class.%0D%0A    //For a bDecision you would make it a negative value as it adds the value onto the criteria.%0D%0A    //***We could just use a 1 or 0 and add or subtract a certain amount in the district but thats something I have to discuss%0D%0A    //***With the team.%0D%0A    District createDistrict (int dType) %7B%0D%0A        District d = new CoastalDistrict(dType);%0D%0A        d.setName();%0D%0A        d.setPop(0);%0D%0A        d.setBudget(0);%0D%0A        d.setDeath(0);%0D%0A        System.out.println(d.getDistrict());    //debug line%0D%0A        return d;%0D%0A    %7D%0D%0A    %0D%0A    void processCommandLoop () %7B%0D%0A        int districtType = getDistrictFromUser ();%0D%0A        createDistrict(districtType);%0D%0A    %7D%0D%0A    %0D%0A%7D

Add files via upload