31 lines
986 B
C++
31 lines
986 B
C++
#pragma once
|
|
#include <ostream>
|
|
#include <string.h>
|
|
#include <string>
|
|
|
|
class Atomkern {
|
|
private:
|
|
unsigned int ordnungs_zahl;
|
|
unsigned int massen_zahl;
|
|
std::string elementsymbol;
|
|
|
|
public:
|
|
static Atomkern NEUTRON;
|
|
static Atomkern PROTON;
|
|
Atomkern();
|
|
Atomkern(std::string symbol, unsigned int masseZ, unsigned int ordnungZ);
|
|
Atomkern(unsigned int masseZ, unsigned int ordnungZ)
|
|
: ordnungs_zahl(ordnungZ), massen_zahl(masseZ), elementsymbol("") {}
|
|
std::string symbol() const;
|
|
unsigned int ordnungszahl() const;
|
|
unsigned int massenzahl() const;
|
|
// const Atomkern operator+(const Atomkern &atom1);
|
|
Atomkern &operator+=(const Atomkern &atom1);
|
|
Atomkern operator-(const Atomkern &atom1);
|
|
Atomkern operator-=(const Atomkern &atom1);
|
|
bool operator==(Atomkern const atom2);
|
|
};
|
|
Atomkern operator+(const Atomkern &atom1, const Atomkern &atom2);
|
|
Atomkern operator*(int i, const Atomkern &atom1);
|
|
std::ostream &operator<<(std::ostream &os, const Atomkern &atom);
|