/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package theaterpeople; /** * * @author jcmt */ public class Producer extends TheaterPeople { private String typeOfProducer; private double howMuchInvested; private int activityLevel; public Producer(String typeOfProducer, double howMuchInvested, int activityLevel, String lastName, String firstName, int day, int month, int year) { super(lastName, firstName, day, month, year); this.setTypeOfProducer(typeOfProducer); this.setHowMuchInvested(howMuchInvested); this.setActivityLevel(activityLevel); } public String getTypeOfProducer() { return typeOfProducer; } public void setTypeOfProducer(String typeOfProducer) { if (typeOfProducer.equalsIgnoreCase("Executive")) { this.typeOfProducer = typeOfProducer; } else { this.typeOfProducer = ""; } } public double getHowMuchInvested() { return howMuchInvested; } public void setHowMuchInvested(double howMuchInvested) { if (howMuchInvested > 10000) { this.howMuchInvested = howMuchInvested; } else { this.howMuchInvested = 5000; } } public int getActivityLevel() { return activityLevel; } public void setActivityLevel(int activityLevel) { switch (activityLevel) { case 0: case 1: case 2: this.activityLevel = activityLevel; default: this.activityLevel = 0; } } }