Question: Create a class named Package with data fields for wrghtin ounces, shipping method, and shipping cost The shipping method is a character: A for air,

 Create a class named Package with data fields for wrghtin ounces,

Create a class named Package with data fields for wrghtin ounces, shipping method, and shipping cost The shipping method is a character: A for air, T for truck, or Mfor mail. The Package class contains a constructor that requires arguments for weight a shipping method. The constructor calls a calculateCostl method chat determines the shipping cost based an the follow ng table: Weight loz) Air i5) Truck (S Mai to 8 2.00 50 to 15 3.00 ? and over 450 The package c ass also contains a disp method that displays the values in all four fields. Create a subclass armed InsuredPackage t atac an n surance cost to the sh co toas onchefo o bl tional Cost Shipping Cost Before Insurance (S) 0 tO 1.00 ddi 13 45 01 to 3.00 01 and over write an application amed Us Package that instantiates at least three o ects of each type Package and insure Package sin a variety of ei tsa s sp ng m es so ri er ts re Pack ge 3 ns red u s er eme ackage.java, InsuredPackage.java, and UePackagejava

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!