Реализовать задачу с абстрактными классами - C#

Узнай цену своей работы

Формулировка задачи:

Листинг программы
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace abstr
  7. {
  8. abstract class vehile
  9. {
  10. public double maxSpeed
  11. {
  12. get { return maxSpeed; }
  13. set { maxSpeed = value; }
  14. }
  15. public double carSpeed
  16. {
  17. get { return carSpeed; }
  18. set { carSpeed = value; }
  19. }
  20. public double yearConstr
  21. {
  22. get { return yearConstr; }
  23. set { yearConstr = value; }
  24. }
  25. public double probeg
  26. {
  27. get { return probeg; }
  28. set { probeg = value; }
  29. }
  30. public abstract void SpeedUp();
  31. public abstract void SpeedDown();
  32. }
  33. class Car
  34. {
  35. }
  36. class Program
  37. {
  38. static void Main(string[] args)
  39. {
  40. }
  41. }
  42. }

Решение задачи: «Реализовать задачу с абстрактными классами»

textual
Листинг программы
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace abstr
  8. {
  9.     abstract class vehile
  10.     {
  11.         public double maxSpeed
  12.         {
  13.             get { return maxSpeed; }
  14.             set { maxSpeed = value; }
  15.         }
  16.         public double carSpeed
  17.         {
  18.             get { return carSpeed; }
  19.             set { carSpeed = value; }
  20.         }
  21.         public double yearConstr
  22.         {
  23.             get { return yearConstr; }
  24.             set { yearConstr = value; }
  25.         }
  26.         public double probeg
  27.         {
  28.             get { return probeg; }
  29.             set { probeg = value; }
  30.         }
  31.         public abstract void SpeedUp();
  32.         public abstract void SpeedDown();
  33.        
  34.     }
  35.     class Car
  36.     {
  37.        }
  38.     class Program
  39.     {
  40.         static void Main(string[] args)
  41.         {
  42.         }
  43.     }
  44. }

ИИ поможет Вам:


  • решить любую задачу по программированию
  • объяснить код
  • расставить комментарии в коде
  • и т.д
Попробуйте бесплатно

Оцени полезность:

7   голосов , оценка 4.286 из 5

Нужна аналогичная работа?

Оформи быстрый заказ и узнай стоимость

Бесплатно
Оформите заказ и авторы начнут откликаться уже через 10 минут
Похожие ответы