Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Problem Star bureaucrat Hermes Conrad has developed a new pricing system for the

ID: 3650450 • Letter: P

Question


Problem
Star bureaucrat Hermes Conrad has developed a new pricing system for the packages delivered by Planet Express, and has asked you to implement his new system. Packages come in 3 different kinds. 2-Dimensional: like cards, letters and pictures. 3-Dimensional: like boxes, presents and manwiches. and 4-Dimensional: like Tesseracts, Klein Bottles and some Doomsday devices.

Each package kind has a different pricing system:
? 2D packages are charged by their area times the 2D rate of $0.05
? 3D packages are charged by their volume times 0.02, plus their weight times the 3D rate of $2.15
? 4D packages are charged by their hypervolume times 0.01 plus their weight times the 4D rate of $3.14 plus an

Explanation / Answer

You should use multiple inheritance Java does not support mutliple inheritance so your class cannot extend more than one class but java support multilevel inheritance example class A { . . . } class B extends A { . . } class C extends B { . . } int main() { double length, width, depth; int num; int dimensions; string sender; string recipient; package** item= new animal*[3]; item[0]=twodpackage; item[1]=threedpackagage; item[2]=fourdpackage; cout> num; for (int i=0; i dimensions; cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote