The market for DukeDash is U.S. citizens who have moved to a country that uses the international system of units (i.e., SI units) and have brought their car/motorcycle with them. The difficulty that such people have is that the car measures and reports the speed in miles per hour (mi/hr) but the speed limit signs on the side of the road are in kilometers per hour (km/hr). DukeDash is an electronic dashbboard that replaces the built-in dashboard. It is given the current speed in mi/hr, converts it to km/hr, and displays the speed in km/hr.
a. A textual version of an algorithm for converting a speed in mi/hr to a speed in km/hr.
b. A textual version of an algorithm for converting a command-line string to a real-valued speed in mi/hr, converting the speed in mi/hr to the equivalent speed in km/hr, and "printing" the speed in km/hr.
c. A Java application for converting a command-line string to a real-valued speed in mi/hr, converting the speed in mi/hr to the equivalent speed in km/hr, and "printing" the speed in km/hr.
d. A Java application for converting a command-line string to a real-valued speed in mi/hr, converting the speed in mi/hr to the equivalent speed in km/hr, and displaying the speed in km/hr on a dashboard.
pa1
) that
will hold all of the files for this assignment.
First, you should make sure that your implementation conforms to the course style guide.
Second, you should test your Java implementation using the following test cases (for the speed in mi/hr):
You must calculate the correct answers by hand and verify that your implementation generates the correct answers. Your answers must be correct to two decimal places.
Third, you should think about why each of the test cases above is interesting/significant/important.
Fourth, if and only if your Java implementation works correctly for each of the above test cases, you should load the Blackboard page for PA1c and:
SpeedPrinter.java
as the answer to Question 2.Copyright 2013