Recent content by dcs1953

  1. D

    MHB Using constants in expressions.

    import java.util.Scanner; public class ShippingCalculator { public static void main (String [] args) { int shipWeightPounds = 10; int shipCostCents = 0; final int FLAT_FEE_CENTS = 75; shipWeightPound = shipCostCost / shipWeightPound; final int CENTS_PER_POUND...
  2. D

    MHB Gravity Calculation: Calculate Accel Gravity

    public class GravityCalculation { public static void main (String [] args) { double G = 6.673e-11; double M = 5.98e24; double accelGravity = 0.0; double distCenter = 0.0; distCenter = 6.38e6; /* Your solution goes here */...
  3. D

    MHB Calculate Sphere Volume Using (4.0/3.0) Division

    Given sphereRadius and piVal, compute the volume of a sphere and assign to sphereVolume. Use (4.0 / 3.0) to perform floating-point division, instead of (4 / 3) which performs integer division. public class SphereVolumeCalculator { public static void main (String [] args) { double piVal...
Back
Top