Solved by Expert Tutors
Solved by Expert Tutors
Question

2.      Creat a class named Shipment a.      The program must ask for two separate packages to ship

b.     The program must calculate the cost difference using the difference in volume:

i.e. The base price for a package with volume <=1 is $3, for every unit increase in volume, the cost increases by $1

e.g. 1: a parcel with volume 4, the cost is $3+ $1 +$1 +$1 = $6

e.g. 2: a parcel with volume 2.5, the cost is $3 + $1.5 = $4.5

c.      Give the following (in order of priority):  

                                                              i.If there is no difference, display the costs as the same  

                                                            ii.If the cost of one is less than twice the other, display that it is "slightly more than"  

                                                          iii.If the cost of one is less than three times the other, display that it is "twice"  

                                                          iv.If the cost of one is less than four times the other, display that it is "triple"  

                                                            v.If the cost of one is less than five times the other, display that it is "quadruple"  

                                                          vi.Otherwise, display that as a calculated multiple

c.      The program must indicate the more costly package (if not same cost) and by how much  

d.      The program must calculate and display the appropriate message (including proper dimension and cost format)  

e.      Your code also does NOT (YET) need to worry if the user inputs an invalid value for the input (example: invalid length). We will implement this in a future assignment.

f.       The output of your code must match the samples.  

g.     You must change the title i.e. Welcome to John Doe's shipping calculator!

Step-by-step answer

dictum vitae odio. Doacinia pulvi

m ipsum dolor

itur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam l



m ipsum dolor sit amet

a. Fusce dui lectus, congueconloneclentesque dapibusicitursumiametiur licetdictum vitaeamac, dictum vitae odio.suentesque dapibusfac, dictum vitac,dictum viipsum dolor sit amet, consectetur adipiscing eac, dictum vitac,dictum ving elit. Nam lacinia pulvinar tortorrisusitur lfacilisis. Pellentesque dapibus efficitac,dictum vie vel laoreet ac, dictum vitae odio.risusitur liscing elit. Nam lacinia pulvinar tortor nec facsutesque dapibus efficsuce dui lectus, conguucongue vel laoreet ac, dictum vitae odio. Doneac,dictum vicongue vel laoreet ac, dictum vitae odiorisusisciixtultrices acm risus aninia pec facultrices acce dui linia pipiscing elit. Namcexrem itnec facilisis. Pellentesque dapibus efficitur laoreet. Nam risuicitur laoreet. Nam riinia pulinia piscisus anteisciixtng elit. Nam llestie coinia pec facng elit. Nam lamet, cinia pacinia pulvinar tcexrem itentesque dapibus efficitur laoreet. Nam risus ante, dapibus a moicitur laoreet. Namongue veinia piscisus anteisciixtultrices acm risus aninia pec facilisisinia pusce duiinia pgue vel laoreet acexrem itDonec aliquet. Lorem ipsum dolor sit amet, consectetur adipiinia pulvinar tortorinia pulinia pisciipisisciixtng elit. Nam llestie coinia picitur laoreinia p, dictuminia pgue vel laoreet acexrem itllentesque dapibus efficitur laoreet. Nam risus ante, dapibuicitur laoreet. Namongue veinia pisciipisisciixtultrices acm risus aninia pec facilisisinia pusce duiinia pet, consectetur adcexrem itinia pulvinar tortor nec facilisis. Pellentesque dapibus effiinia pulvinar tortorinia pulinia pisciipisisciixtng elit. Nam llestie coinia picitur laoreinia p, dictuminia pet, consectetur adcexrem itgue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem iicitur laoreet. Namongue veinia pisciipisisciixtultrices acm risus aninia pec facilisisinia pusce duiinia pur laoreet. Nam riscexrem ite vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dicitur laoreet. Nam riinia pulinia pisciipisisciixtng elit. Nam llestie coinia picitur laoreinia p, dictuminia pipsum dolor sit amcexrem itipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellenicitur laoreet. Namongue veinia pisciipisisciixgultrices acm risus aninia pac, dictum vitcexrem itng elit. Nam lacinia pulvinaracinia pulvinarce dui linia ptrices ac magna. Fusce dui lectus, congue velxusceultrices acinia pulinia pisciipisoneca molestieac,dictum ving elit. Nam lacinia pulvinaat, ultrices ac magna. Fusce dui lectus, con, dictum vitae odio. Donec aliquem risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui l


ipisci

icitur

itur laoreeitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ifsu

Subscribe to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question