Question
Package Class Create a class named Package with variables for length, width, and height (use doubles). Assigning the values: You can either create a constructor
Package Class
Create a class named Package with variables for length, width, and height (use doubles).
Assigning the values:
You can either create a constructor with 3 parameters or you can use a public function to set them. To keep it simple, you do not have to get user input.
PackageSize
Create a public function named PackageSize that returns the package's size. Use UPS's formula: length + 2 * width + 2 * height. The tricky part is that the length should be the largest dimension. See UPS Package Size for more information. If you are struggling with calculating the longest side, just focus on creating the object.
Program
Create a program that creates 2 packages. For each, assign dimensions to the packages. Ask each package for its package size and display the values returned.
Upload your .cpp and .h files (you should have 3)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started