-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMembership.cs
More file actions
61 lines (53 loc) · 1.09 KB
/
Membership.cs
File metadata and controls
61 lines (53 loc) · 1.09 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
namespace MembershipNamespace
{
public class Membership
{
string status;
public string Status
{
get { return status; }
set
{
status = value;
}
}
int points;
public int Points
{
get { return points; }
set
{
points = value;
}
}
public Membership()
{
status = "";
points = 0;
}
public Membership(string status, int points)
{
Status = status;
Points = points;
}
void EarnPoints(double amount)
{
points += (int)amount / 10;
}
bool RedeemPoints(int points)
{
if (points > 100)
{
return true;
}
else
{
return false;
}
}
public override string ToString()
{
return "Status: " + status + " Points: " + points;
}
}
}