A weigh station is a checkpoint along a highway to inspect vehicular weights. This inspection is necessary to prevent heavy vehicles from damaging roads and bridges. Weigh stations measure each...


A weigh station is a checkpoint along a highway to inspect vehicular weights. This inspection is necessary to prevent heavy vehicles from damaging roads and bridges. Weigh stations measure each vehicle’s gross weight and the weight on each axle using a set of in-ground truck scales. The Federal Bridge Gross Weight Formula of the U.S. Department of Transportation (DOT) is used to determine the appropriate maximum gross weight allowable for a commercial motor vehicle, based on axle spacing. This formula is where


• w is the maximum weight in pounds that can be carried on a group of two or more axles to the nearest 500 pounds


• L is the distance in feet between the outer axles of any two or more consecutive axles


• n is number of axles considered






The truck in the following diagram is within the allowable gross weight



Experience has shown that the weights on axles 1 through 3, 1 through 5, and 2 through 5 are critical and are the ones that must be checked. If these weights, when considered with the distances between axles 1 and 3, 1 and 5, and 2 and 5, are within the limits imposed by the DOT formula, the truck will pass inspection.


Design and implement a class Truck that has as data fields the essential characteristics needed for the DOT formula. Also, design and implement a class WeighStation that has a method to determine whether a given Truck object is in compliance with or exceeds the allowable weight.


Finally, write a program that allows a user to enter the gross weight of a truck, the weight on each axle, and the distance between the various combinations of its five axles. Using the classes Truck and WeighStation, your program should display a message indicating whether the weight of the truck is within or exceeds the maximum allowable weight as determined by the DOT formula.

May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here