-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSocialFundraiser.java
More file actions
38 lines (35 loc) · 1.23 KB
/
SocialFundraiser.java
File metadata and controls
38 lines (35 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* @author Fuad Mohamoud
*/
public class SocialFundraiser extends Fundraiser
{
/**
*toString method used to output specific information about the current SocialFundraiser
* @return output indicating a SocialFundraiser has been ran and the name of candidate running the PhoneFundraiser
*/
public String toString()
{
String output="This is a Social Fundraiser for " + getCandidate().getName();
return output;
}
/**
*Default Constructor to build and empty PhoneFundraiser
* Default Constructor is required in order for program to run, however it not actually used.
*/
public SocialFundraiser()
{
}
/**
* Full Parameter Constructor to build a SocialFundraiser using the inputted parameter values provided
* @param inLoc will be used as the location of the SocialFundraiser
* @param inCandidate will used as the candidate run the SocialFundraiser
*/
public SocialFundraiser(String inLoc, Candidate inCandidate)
{
setLocation(inLoc);
setCandidate(inCandidate);
donors = rand.nextInt(201);
raiseMoney();
inCandidate.setMoneyMod(inCandidate.getMoneyMod()+.1);
}
}