From 88d27a448ccb0a3906a18974b7f6b6d2f4fb6cf2 Mon Sep 17 00:00:00 2001 From: kachelto100370 Date: Tue, 9 Jun 2026 17:01:56 +0200 Subject: [PATCH] header gemacht --- 8_9_Atomkern/code/Atomkern/Atomkern.cpp | 1 + 8_9_Atomkern/code/Atomkern/Atomkern.h | 28 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 8_9_Atomkern/code/Atomkern/Atomkern.cpp create mode 100644 8_9_Atomkern/code/Atomkern/Atomkern.h diff --git a/8_9_Atomkern/code/Atomkern/Atomkern.cpp b/8_9_Atomkern/code/Atomkern/Atomkern.cpp new file mode 100644 index 0000000..11dc545 --- /dev/null +++ b/8_9_Atomkern/code/Atomkern/Atomkern.cpp @@ -0,0 +1 @@ +#include "Atomkern.h" diff --git a/8_9_Atomkern/code/Atomkern/Atomkern.h b/8_9_Atomkern/code/Atomkern/Atomkern.h new file mode 100644 index 0000000..13efe49 --- /dev/null +++ b/8_9_Atomkern/code/Atomkern/Atomkern.h @@ -0,0 +1,28 @@ +#pragma once +#include +#include +#include + +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, int masseZ, int ordnungZ); + std::string symbol(); + unsigned int ordnungszahl(); + unsigned int massenzahl(); + Atomkern operator+(Atomkern atom2); + Atomkern operator+=(Atomkern atom2); + Atomkern operator-(Atomkern atom2); + Atomkern operator-=(Atomkern atom2); + Atomkern operator*(int skalar); + Atomkern operator==(Atomkern atom2); + bool operator==(bool, Atomkern atom); + std::ostream operator<<(Atomkern atom); +};