-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgramInputProduct.cs
32 lines (28 loc) · 1.01 KB
/
ProgramInputProduct.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
using System;
using System.Collections.Generic;
using System.Text;
namespace ManajemenKasirMccRanur
{
public class ProgramInputProduct
{
public String productName { get; set; }
public int productStock { get; set; }
public double productPrice { get; set; }
public static Display print = new Display(60, "left", "space");
public ProgramInputProduct() {
}
public ProgramInputProduct(string productName, int productStock, double productPrice)
{
this.productName = productName;
this.productStock = productStock;
this.productPrice = productPrice;
}
public void DisplayProduct() {
print.Content($"{this.productName} ~ price: {this.productPrice} Stock: ({this.productStock} Left)");
}
public void DisplayProduct(int no)
{
print.Content($"[{no}.] {this.productName} ~ price: {this.productPrice} Stock: ({this.productStock} Left)");
}
}
}