Page 1 of 1

2. please help me get the correct code that runs correctly

Posted: Tue Jul 05, 2022 10:26 am
by answerhappygod
2.
please help me get the correct code that runs correctly
2 Please Help Me Get The Correct Code That Runs Correctly 1
2 Please Help Me Get The Correct Code That Runs Correctly 1 (56.87 KiB) Viewed 10 times
2) Create a class named Package using the following specifications (14 pts): a. Data fields for the member variables trackingNum, shippingAddress, destinationAddress, recipientName, itemCost, shippingAndHandling, and totalCost. b. A no-argument (default) constructor that sets trackingNum and shippingAddress to be null strings and totalCost to be 0. c. A constructor that sets trackingNum, shippingAddress, and totalCost to a specified value. d. A string function that returns trackingNum. e. A void function that prints the shippingAddress and destinationAddress onto the console. f. A double function to calculate totalCost using itemCost and shippingAndHandling. g. Implement the definitions for these functions and constructors.