a Program Class OvernightPackage should inherit directly from class Package and contain an additional data member representing type of package and service fee for overnight delivery. Fee is computed depending on the weight of the package.  Create the following for class TwoDayPackage Compute cost Provide appropriate constructors Override toString to include attributes of subclass

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter8: Network Models
Section8.5: Minimum-cost Network Flow Problems
Problem 8P
icon
Related questions
Question

Java Program

Class OvernightPackage should inherit directly from class Package and contain an additional data member representing type of package and service fee for overnight delivery. Fee is computed depending on the weight of the package. 

Create the following for class TwoDayPackage

  • Compute cost
  • Provide appropriate constructors
  • Override toString to include attributes of subclass

Use the attached photo below for reference: 

Type of Package
Туре
Code Rate per ounce
Small Items
S 250.00
Large and bulky Good L
1500.00
Delicate Items
D
2000.00
Business Deliveries B
1800.00
Transcribed Image Text:Type of Package Туре Code Rate per ounce Small Items S 250.00 Large and bulky Good L 1500.00 Delicate Items D 2000.00 Business Deliveries B 1800.00
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole