예제 #1
0
double TwoDayPackage::CalculateCost(){ //calculate shipping cost

	double weight = getWeight();
	double cPO = getCostPerOunce();

	return (weight * cPO + FlatFee); //return cost with flat fee factored in

} 
예제 #2
0
double OvernightPackage::calculateCost()
{
	return (getWeight() * (getCostPerOunce() + feePerOunce));
}
예제 #3
0
파일: Package.cpp 프로젝트: rosen90/GitHub
// calculate shipping cost for package
double Package::calculateCost() const
{
   return getWeight() * getCostPerOunce();
} // end function calculateCost