Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

OOP Homework Inheritance 1.    Given two classes as described in Customer.py (at

by | Feb 28, 2022 | Computer and Web Programming : Python Programming | 0 comments

GET HELP WITH YOUR ESSAY

If you need assistance with writing your essay, our professional Essay Writing Service is here to help!

ORDER THIS OR A SIMILAR PAPER NOW

OOP Homework Inheritance
1.    Given two classes as described in Customer.py (attached)
Revise the class using inheritance to simplify the codes and to remove repetition of codes
2.    Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create an inheritance hierarchy to represent various types of packages.
•    Use class Package as the parent class of the hierarchy, then include classes TwoDayPackage and OvernightPackage that derive from Package.
•    Parent class Package should include attributes representing the sender and recipient of the package (using the classes in Problem 1), in addition to attribute that store the weight (in kg) and cost per kg to ship the package.
•    Package’s constructor should initialize these attributes. Ensure that the weight and cost per kg contain positive values.
•    Package should provide an attribute PackageList which collects all of packages into a list
•    Package should provide a method calculateCost that returns the cost associated with shipping the package. Package’s calculateCost method should determine the cost by multiplying the weight by the cost per kg.
•    Derived class TwoDayPackage should inherit the functionality of parent class Package, but also include an attribute that represents a flat fee that the shipping company charges for two-day-delivery service.
•    TwoDayPackage’s  constructor should receive a value to initialize this attribute. TwoDayPackage should override method calculateCost so that it computes the shipping cost by adding the flat fee to the weight-based cost calculated by class Package’s calculateCost function.
•    Class OvernightPackage should inherit directly from class Package and contain an additional attribute representing an additional fee per kg charged for overnight-delivery service. OvernightPackage should redefine method calculateCost so that it adds the additional fee per kg to the standard cost per kg before calculating the shipping cost
With the following command in the main program,
74 c1 = Sender(‘Ellen’,’Abberton’,’WR10′) 75 c2 = Recipient(‘Jane’,’Abbey Dore’,’HR2′) 76 77 c3 = Sender(‘Mike’,’Agglethorpe’,’DL8′) 78 c4 = Recipient(‘Andy’,’Acton Bridge’,’CW8′) 79
80 c5 = Sender(‘Andy’, ‘Acton Bridge’,’CW8′) 81 c6 = Recipient(‘Luke’,’Abingworth’,’RH20′) 82 83 package1 = Package(c1,c2,2,200) 84 85 package2 = TwoDayPackage(c3,c4,3,210,50) 86 87 package3 = OvernightPackage(c5,c6,2,250,55)
The output should look like the following

ORDER THIS OR A SIMILAR PAPER NOW

Our Services

Top quality papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university, or professional, and we will assign a writer who has a respective degree.

Professional writers

We have hired a team of professionals who provide expert academic help. Most of them are native speakers and PhD holders who are able to take care of any assignment you need help with.

 

Free Revision

If you feel that we missed something, send the order for a free revision. You will have 10 days to send the order for revision after you receive the final paper. You can either do it on your own after signing in to your personal account or by contacting our support team.

On Time Delivery

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

24/7 Support

Our support agents are available 24/7 and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Original

We use several checkers to make sure that all papers you receive are plagiarism-free. Our editors carefully go through all sources and in-text citations. We also promise full confidentiality in all our services.

 

Pediatric Care

Customer satisfaction has always been one of our basic concerns. If you don’t feel satisfied with our delivered work, you can request for a refund.

 

Authentic Source

We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.

 

Our confidential essay writing service protects your privacy

We cherish your trust and do our best to protect you. Anything that you share with our private essay writing service is never misused as the access to your personal data is very limited. Your payment details and credit card number also fall under strict protection when you buy a custom essay online from us.

    Meet Our Team

    Wondering who’s working behind the scenes of our professional essay writing service? We have over 700 amazing people on our team including developers, QA engineers, designers, managers, HR specialists, marketers, essay writers, and many more. See who takes care of the orders you place.

     

    Super writers

    There are 400+ essay writers from all over the world on our team who go through a 3-step hiring process. We call them super-writers because most of them have master’s degrees; therefore, they know the ins and outs of the discipline in which they specialize.

     

    WOW-support

    Our extra-fast and caring support assistants answer your questions 24/7 and resolve any of your troubles. Our team was even nominated for the 2019 Best Quality Management Team Award by the European Contact Centre & Customer Service.

    If you are looking for a reputable and cheapest college essay writing service or homework help websites for college students to write your essay for you or do your homework, you are at the right place. We have more than 1000 essay writers who can help you write your essays for you. Just fill the order form above to submit your instructions and get an online essay helper or essay writer who can “write my essay for me”. Once you do, you will be happy that you used our essay services instead of any other online essay writing service.

    Talk To Us

    Need any help? Feel free to Send Us a Note

    Email:  support@eliteacademicessays.com