Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CryptoMiningSystem
  8. {
  9. class MineVideoCard : VideoCard
  10. {
  11.  
  12. public MineVideoCard(string model, int generation, int ram, decimal price) : base(model, generation, ram, price)
  13. {
  14. MinedMoneyPerHour *= 8;
  15. LifeWorkingHours *= 2;
  16. //Generation=generation;
  17. //Generation = int.Parse(generation);
  18. }
  19. private int generation;
  20. public int Generation
  21. {
  22. get { return generation; }
  23. set
  24. {
  25. if (/*value <= 0 || */value > 6) throw new ArgumentException($"Mine video card generation cannot be more than 9!");
  26. generation = value;
  27. }
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement