public Employee(string name, int salary, string jobTitle, string description, BasicPropertys propertys) { this.name = name; this.salary = salary; this.propertys = propertys; this.jobTitle = jobTitle; this.description = description; }
public Contract(string name, string description, Industry industry, int award, int level, int timeLimit, BasicPropertys propertys) { this.name = name; this.description = description; this.industry = industry; this.award = award; this.level = level; this.propertys = propertys; this.timeLimit = timeLimit; }
public static void Main(string[] s) { BasicPropertys test = new BasicPropertys(0, 0, 0); FileHandler handler = new FileHandler(); handler.saveObject(test, null); BasicPropertys read = (BasicPropertys)handler.readObject("test"); Debug.Assert(read.Frontend == 1); Console.WriteLine(read.Frontend == 1); }
private void updateWorkForce() { workforce = new BasicPropertys(0, 0, 0); foreach (KeyValuePair <Property, List <Employee> > entry in workAssigns) { foreach (Employee e in entry.Value) { int hisAbility = e.getPropertys().getPropertyQuant(entry.Key); workforce.updatePropertyQuant(entry.Key, hisAbility); } } }
//need fail function public Project(Contract contract, List <Employee> employees) { this.contract = contract; // record the workload requirements of the contract workload = contract.getPropertys().givecopy(); listOfPropertyLeft = workload.getListOfProperty(); // add employees & record work force foreach (Employee e in employees) { manpowers.Add(e); e.gotowork(); } workAssignsInit(); }
// add from input to the current propertys // current = input public void add_propertys(BasicPropertys input) { this.Frontend += input.Frontend; this.Backend += input.Backend; this.Graphics += input.Graphics; }