code_junkie

Where should I put my first method

Nov 13th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. class CompanyFinanse
  2. {
  3. public decimal WeightedSumOfWorkerSalaryAndSuperior(Worker WorkerA, Worker Superior)
  4. {
  5. return WorkerA.Salary + Superior.Salary * 2;
  6. }
  7. }
  8.  
  9. public class Worker {
  10. public Worker Superior {get;set;}
  11. public readonly decimal WeightedSalary {
  12. get {
  13. return (Superior.Salary * 2) + (this.Salary)
  14. }
  15. }
  16. public decimal Salary {get;set;}
  17. }
  18.  
  19. public static class Finance {
  20. public static decimal WeightedSumOfWorkerSalaryAndSuperior(Worker WorkerA, Worker Superior) {
  21. return WorkerA.Salary + Superior.Salary * 2; }
  22. }
Add Comment
Please, Sign In to add comment