Advertisement
desislava_topuzakova

Untitled

Jul 5th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 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 Exam1
  8. {
  9. class Student
  10. {
  11. private string name;
  12. private double grade;
  13.  
  14. public string Name
  15. {
  16. get
  17. {
  18. return name;
  19. }
  20. set
  21. {
  22. name = value;
  23. }
  24. }
  25. public double Grade
  26. {
  27. get
  28. {
  29. return grade;
  30. }
  31. set
  32. {
  33. grade = value;
  34. }
  35. }
  36.  
  37. public Student()
  38. {
  39. }
  40.  
  41. public Student(string name, double grade)
  42. {
  43. name = Name;
  44. grade = Grade;
  45.  
  46. }
  47.  
  48. public string Text(string name, double grade)
  49. {
  50.  
  51. return $"Student {name}has { grade: F2}.";
  52. }
  53.  
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement