Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include <string>
  4. #include "Galaktyka.h"
  5. #include "CzarnaDziura.h"
  6. #include "ObiektyAstronomiczne.h"
  7.  
  8.  
  9. using namespace std;
  10.  
  11. class Kosmos
  12. {
  13. public:
  14. static int licz;
  15. string nazwa;
  16. string rozszerzalnosc;
  17. int czas_kreacji;
  18. int liczba_galaktyk;
  19.  
  20. Galaktyka *galaktyka;
  21. CzarnaDziura czarna_dziura;
  22. ObiektyAstronomiczne obiekty_astronomiczne;
  23.  
  24.  
  25. Kosmos();
  26. Kosmos(string nazwa, string rozszerzalnosc, int czas_kreacji, int liczba_galaktyk);
  27. Kosmos(const Kosmos &k);
  28. ~Kosmos();
  29.  
  30. void liczbaObiektow();
  31. void wyswietlKosmos();
  32.  
  33. Kosmos& operator + (const Kosmos &k);
  34. Kosmos& operator - (const Kosmos &k);
  35. Kosmos& operator += (const Kosmos &k);
  36. Kosmos& operator -= (const Kosmos &k);
  37. Kosmos& operator = (const Kosmos &k);
  38. bool operator == (const Kosmos &k);
  39. bool operator != (const Kosmos &k);
  40. bool operator < (const Kosmos &k);
  41. bool operator > (const Kosmos &k);
  42.  
  43.  
  44. };
  45. #pragma once
  46. #include <iostream>
  47. #include <string>
  48.  
  49. using namespace std;
  50.  
  51. class Galaktyka
  52. {
  53. public:
  54. string nazewnosc;
  55. int planetozbiory;
  56. int gwiazdy;
  57. int planety;
  58.  
  59. Galaktyka();
  60. ~Galaktyka();
  61.  
  62. void wyswietlGalaktyka();
  63.  
  64. };
  65. #include <iostream>
  66. #include <string>
  67. #include "Galaktyka.h"
  68.  
  69. using namespace std;
  70.  
  71. Galaktyka::Galaktyka()
  72. {
  73. #ifdef _DEBUG
  74. cout << "Zadzialal konstruktor domyslny do Galaktyka" << endl;
  75. #endif _DEBUG
  76.  
  77. nazewnosc = "Rotfl102938";
  78. planetozbiory = 159;
  79. gwiazdy = 2489;
  80. planety = 8534404;
  81.  
  82. }
  83.  
  84. void Galaktyka::wyswietlGalaktyka()
  85. {
  86. cout << "Galaktyka:" << endl;
  87. cout << "Nazwa: " << nazewnosc << endl;
  88. cout << "Ilosc planetozbiorow: " << planetozbiory << endl;
  89. cout << "Ilosc gwiazd: " << gwiazdy << endl;
  90. cout << "Ilosc planet: " << planety << endl;
  91. }
  92.  
  93. Galaktyka::~Galaktyka()
  94. {
  95. #ifdef _DEBUG
  96. cout << "Zadzialal dekonstruktor do Galaktyka" << endl;
  97. #endif _DEBUG
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement