code thing

void Material::updateCommod(Commodity newType)
{
if (newType == myType) {
throw MatException(
“Attempted to change Material’s Commodity type to its current type”); }
myType = newType;
}

void Material::changeCommod(Commodity newCommod)
{
if (newCommod == myType)
throw MatException(“Tried to change Commodity type to the current type.”);

myType = newCommod;
}