-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathold-vendingitem.cs
38 lines (32 loc) · 1.03 KB
/
old-vendingitem.cs
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
using System;
using System.Collections.Generic;
using System.Text;
namespace Capstone
{
public abstract class VendingItem
{
/// <summary>
/// The name of the VendingItem
/// </summary>
public string ProductName { get; private set; }
/// <summary>
/// The price of the VendingItem
/// </summary>
public decimal Price { get; private set; }
/// <summary>
/// How many of each VendingItem remains
/// </summary>
public int ItemsRemaining { get; private set; }
/// <summary>
/// What the menu displays when the VendingItem is vended
/// </summary>
public string MessageWhenVended { get; private set; }
public VendingItem(string productName, decimal price, int itemsRemaining, string messageWhenVended)
{
this.ProductName = productName;
this.Price = price;
this.ItemsRemaining = itemsRemaining;
this.MessageWhenVended = messageWhenVended;
}
}
}