public Employee(Store aStore, int eId, decimal salary, string first, string last, string dob, string address) : base(first, last, dob, address) { this.employeeId = eId; this.store = aStore; this.salary = salary; }
public Register(int registerId, Store store, Cashier cashier) { this.id = registerId; this.store = store; this.cashier = cashier; createNewSale(); }
public FormPOS() { InitializeComponent(); Store store = new Store(1, "ABC","123 Abc St, ABC, CA 99999", 0.08m); Cashier cashier = new Cashier(store, 1, 1200m, "CashierA", "", "1/1/1988", "123 Abc St, ABC, CA 99999"); setRegister(new Register(1, store, cashier)); }
public void getNumberOfRegistersTest() { string name = "ABC Market"; string address = "123 Somewhere St, aCity, aState 00000"; decimal taxRate = 0.08m; Store target = new Store(1, name, address, taxRate); Assert.AreEqual(0, target.getNumberOfRegisters()); target.addRegister(new Register(1234)); Assert.AreEqual(1, target.getNumberOfRegisters()); target.addRegister(new Register(2345)); Assert.AreEqual(2, target.getNumberOfRegisters()); }
public void addRegisterTest() { string name = "ABC Market"; string address = "123 Somewhere St, aCity, aState 00000"; decimal taxRate = 0.08m; Store target = new Store(1, name, address, taxRate); Register aRegister = new Register(1234,target); target.addRegister(aRegister); Assert.AreEqual(0, target.getRegisters().IndexOf(aRegister)); Register anotherRegister = new Register(2345); target.addRegister(anotherRegister); Assert.AreEqual(1, target.getRegisters().IndexOf(anotherRegister)); }
public Register(int registerId, Store store) { this.id = registerId; this.store = store; }
public Manager(Store aStore, int eId, decimal salary, string first, string last, string dob, string address) : base(aStore, eId, salary, first, last, dob, address) { employees = new List<Employee>(); }
public Cashier(Store aStore, int eId, decimal salary, string first, string last, string dob, string address) : base(aStore, eId, salary, first, last, dob, address) { }