// PL4/class2a.cpp // An example using a class with a mistake // Niels Walet, last updated 04/12/2019 #include #include #include class particle { private: std::string type; double mass; double momentum; double energy; public: // Function to set type of particle void set_type(const string &ptype) {type=ptype;} // Function to print type of particle void print_type() {cout<<"Particle is of type "<