Exercise 1: Design an interface named ConversionFactors that declare instance variable called inTOMm with value 25.3, ounToGram with value 28.35, and pounToGram with value 453.59. Besides, design an...


Exercise 1:<br>Design an interface named ConversionFactors that declare instance variable called inTOMm<br>with value 25.3, ounToGram with value 28.35, and pounToGram with value 453.59. Besides,<br>design an interface named Conversions that contains method declarations for inToMm,<br>ounToGram and pounToGram. All the methods return a double type value and do not has<br>parameter. For an example, method inToMm converts inches to millimeters using the formula<br>inches * inToMm. Next, design a class named myClass that implements<br>ConversionFactors and Conversions.myClass has instance variable called pounds,<br>inches, and ounces, constructor and implements all the methods declared in Conversions<br>interface. The following is the output example when creating myClass object by initializing 50,<br>25, 100 to pounds, inches, and ounces respectively:<br>50.0 pounds is equal to 22679.5 gram<br>100.0 ounces is equal to 2835.0 gram<br>25.0 inches is equal to 632.5 milimeter<br>Draw UML diagrams that involves myClass, ConversionFactors, and Conversion.<br>

Extracted text: Exercise 1: Design an interface named ConversionFactors that declare instance variable called inTOMm with value 25.3, ounToGram with value 28.35, and pounToGram with value 453.59. Besides, design an interface named Conversions that contains method declarations for inToMm, ounToGram and pounToGram. All the methods return a double type value and do not has parameter. For an example, method inToMm converts inches to millimeters using the formula inches * inToMm. Next, design a class named myClass that implements ConversionFactors and Conversions.myClass has instance variable called pounds, inches, and ounces, constructor and implements all the methods declared in Conversions interface. The following is the output example when creating myClass object by initializing 50, 25, 100 to pounds, inches, and ounces respectively: 50.0 pounds is equal to 22679.5 gram 100.0 ounces is equal to 2835.0 gram 25.0 inches is equal to 632.5 milimeter Draw UML diagrams that involves myClass, ConversionFactors, and Conversion.

Jun 02, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here