Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include <string>
- #include "Galaktyka.h"
- #include "CzarnaDziura.h"
- #include "ObiektyAstronomiczne.h"
- using namespace std;
- class Kosmos
- {
- public:
- static int licz;
- string nazwa;
- string rozszerzalnosc;
- int czas_kreacji;
- int liczba_galaktyk;
- Galaktyka *galaktyka;
- CzarnaDziura czarna_dziura;
- ObiektyAstronomiczne obiekty_astronomiczne;
- Kosmos();
- Kosmos(string nazwa, string rozszerzalnosc, int czas_kreacji, int liczba_galaktyk);
- Kosmos(const Kosmos &k);
- ~Kosmos();
- void liczbaObiektow();
- void wyswietlKosmos();
- Kosmos& operator + (const Kosmos &k);
- Kosmos& operator - (const Kosmos &k);
- Kosmos& operator += (const Kosmos &k);
- Kosmos& operator -= (const Kosmos &k);
- Kosmos& operator = (const Kosmos &k);
- bool operator == (const Kosmos &k);
- bool operator != (const Kosmos &k);
- bool operator < (const Kosmos &k);
- bool operator > (const Kosmos &k);
- };
- #pragma once
- #include <iostream>
- #include <string>
- using namespace std;
- class Galaktyka
- {
- public:
- string nazewnosc;
- int planetozbiory;
- int gwiazdy;
- int planety;
- Galaktyka();
- ~Galaktyka();
- void wyswietlGalaktyka();
- };
- #include <iostream>
- #include <string>
- #include "Galaktyka.h"
- using namespace std;
- Galaktyka::Galaktyka()
- {
- #ifdef _DEBUG
- cout << "Zadzialal konstruktor domyslny do Galaktyka" << endl;
- #endif _DEBUG
- nazewnosc = "Rotfl102938";
- planetozbiory = 159;
- gwiazdy = 2489;
- planety = 8534404;
- }
- void Galaktyka::wyswietlGalaktyka()
- {
- cout << "Galaktyka:" << endl;
- cout << "Nazwa: " << nazewnosc << endl;
- cout << "Ilosc planetozbiorow: " << planetozbiory << endl;
- cout << "Ilosc gwiazd: " << gwiazdy << endl;
- cout << "Ilosc planet: " << planety << endl;
- }
- Galaktyka::~Galaktyka()
- {
- #ifdef _DEBUG
- cout << "Zadzialal dekonstruktor do Galaktyka" << endl;
- #endif _DEBUG
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement