zoo_app/app/src/main/java/com/example/jhalloran/zoo/ui/create/CreatePenActivity.java
private void savePen() {
    switch (penTypeSelected) {
      case "Part water part dry pen":
        zoo.addPen(createPartWaterPartDryPen());
        break;
      case "Dry pen":
        zoo.addPen(createDryPen());
        break;
      case "Aquarium":
        zoo.addPen(createAquarium());
        break;
      case "Aviary":
        zoo.addPen(createAviary());
        break;
      case "Petting pen":
        zoo.addPen(createPettingPen());
        break;
    }
    // Return to ZooManagerActivity
    startActivity(manageZooIntent);
  }
// Create Pen of selected type and save to model
Create Pen of selected type and save to model
Create Pen of selected type and save to model
private void savePen() {
    switch (penTypeSelected) {
      case "Part water part dry pen":
        zoo.addPen(createPartWaterPartDryPen());
        break;
      case "Dry pen":
        zoo.addPen(createDryPen());
        break;
      case "Aquarium":
        zoo.addPen(createAquarium());
        break;
      case "Aviary":
        zoo.addPen(createAviary());
        break;
      case "Petting pen":
        zoo.addPen(createPettingPen());
        break;
    }
    startActivity(manageZooIntent);
  }
private void savePen ( ) { switch ( penTypeSelected ) { case "Part water part dry pen" : zoo . addPen ( createPartWaterPartDryPen ( ) ) ; break ; case "Dry pen" : zoo . addPen ( createDryPen ( ) ) ; break ; case "Aquarium" : zoo . addPen ( createAquarium ( ) ) ; break ; case "Aviary" : zoo . addPen ( createAviary ( ) ) ; break ; case "Petting pen" : zoo . addPen ( createPettingPen ( ) ) ; break ; } startActivity ( manageZooIntent ) ; }
Create Pen of selected type and save to model
Create Pen of selected type and save to model
// Return to ZooManagerActivity