// PL4/class2a.cpp // An example using a class with a mistake // Niels Walet, last updated 04/12/2019 // 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; }; void print_data(const struct particle &p) { std::cout.precision(3); // 2 significant figures std::cout<<"Particle: [type,m,p,E] = ["<