Java

| December 15, 2015

PROBLEM:  Write a program to determine the postage class for entered mail.  Postage class is determined by the size of a piece of mail.  The length of a piece of mail is always the side parallel to the written address.  The following mutually exclusive definitions are used to determine a postage class:

REGULAR POST CARD:  The length must be between 3.5 and 4.25 inches, inclusive.  The height must be between 3.5 and 6 inches, inclusive.  The thickness must be between .007 and .016 inches, inclusive.

LARGE POST CARD:  The length must be between 4.25 and 6 inches.  The height must be between 6 and 11.5 inches.  The thickness must be between .007 and .016 inches, inclusive.

ENVELOPE:  The length must be between 3.5 and 6.125 inches, inclusive.  The height must be between 5 and 11.5 inches, inclusive.  The thickness must be between .016 and .25 inches.

LARGE ENVELOPE:  The length must be between 6.125 inches and 24 inches.  The height must be between 11 and 18 inches, inclusive.  The thickness must be between .25 and .5 inches, inclusive.

PACKAGE:  Use package class when the item exceeds all the rules for large envelope and when the length plus the distance around the other sides of a package equals 84 inches or less.

LARGE PACKAGE:  Use large package class when the length plus the distance around the other sides of a package is more than 84 inches but is not more than 130 inches. 

UNMAILABLE:  Any item that does not conform to any of the above requirements.

INPUT:  Each input will contain 3 rational numbers that represent in order the length, width and thickness of a piece of mail.  Use Scanner or JOptionPane.  Stop the program when a negative number is entered

OUTPUT:  For each input, print the postage class according to the rules above. 

Get a 5 % discount on an order above $ 150
Use the following coupon code :
2018DISC
mergers and acquisitions
mexican history

Category: sample papers

Our Services:
Order a customized paper today!