Advertisement
Guest User

Classes_Buchhandlung

a guest
Feb 21st, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 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 Verlag_Buch
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. }
  15.  
  16. class CAutor
  17. {
  18. string a_name;
  19. private List<CBuch> a_Buchlist;
  20. public string A_name
  21. {
  22. get { return a_name; }
  23. set { A_name = value; }
  24. }
  25. //Konstruktor
  26. public CAutor(string a_name)
  27. {
  28. a_Buchlist = new List<CBuch>();
  29. this.a_name = A_name;
  30. }
  31. //Connection
  32. public void addBuch(CBuch a_Buch)
  33. {
  34. a_Buchlist.Add(a_Buch);
  35. }
  36.  
  37. }
  38.  
  39. class CBuch
  40. {
  41. string b_name;
  42. string isbn;
  43. //private List<CAutor> b_Buchlist;
  44.  
  45. public string B_name
  46. {
  47. get { return b_name; }
  48. set { B_name = value; }
  49. }
  50. public string ISBN
  51. {
  52. get { return isbn; }
  53. set { ISBN = value; }
  54. }
  55. //Konstruktor
  56. public CBuch(string B_name, string ISBN)
  57. {
  58. b_Buchlist = new List<CAutor>();
  59. this.b_name = B_name;
  60. this.isbn = ISBN;
  61. }
  62. //Connection
  63. public void addAutor(CAutor b_Buch)
  64. {
  65. b_Buchlist.Add(b_Buch);
  66. }
  67.  
  68. }
  69.  
  70. class CThemengebiet
  71. {
  72. string t_name;
  73. public string T_name
  74. {
  75. get { return t_name; }
  76. set { t_name = value; }
  77. }
  78.  
  79.  
  80. }
  81.  
  82. class CMitarbeiter
  83. {
  84. string m_name;
  85.  
  86. private List<CThemengebiet> m_Themenliste;
  87.  
  88. public string M_name
  89. {
  90. get { return M_name; }
  91. set { m_name = value; }
  92. }
  93.  
  94. public CMitarbeiter(string m_name)
  95. {
  96. m_Themenliste = new List<CThemengebiet>();
  97. this.m_name = M_name;
  98. }
  99. public void AddThemengebiet(CThemengebiet m_Themengebiet)
  100. {
  101. if(m_Themenliste.Count<3)
  102. {
  103. m_Themenliste.Add(m_Themengebiet);
  104. }
  105. }
  106.  
  107. }
  108.  
  109. class CVerlag
  110. {
  111. string v_name;
  112.  
  113. public string V_name
  114. {
  115. get { return v_name; }
  116. set { v_name = value; }
  117. }
  118.  
  119.  
  120. }
  121. }
  122. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement