Java Project

profilefacelessvoidmc
donor.java

/** * A Donor has a tax_id, name, and a pledge for the amount of donation. */ public class Donor { private String taxId; private String name; private int pledge; /** * Constructor for Donor given tax_id, name, and pledge. * @param donorId the tax_id of the donor * @param donorName the name of the donor (may be individual or organization) * @param amount the pledge amount */ public Donor(String donorId, String donorName, int amount) { taxId = donorId; name = donorName; pledge = (amount > 0)? amount : 0; } /** * Gets the id of the donor * @return the donor id */ public String getTaxId() { return taxId; } /** * Gets the name of the donor * @return the donor name */ public String getName() { return name; } /** * Gets the pledge amount * @return the pledge amount */ public int getPledge() { return pledge; } }