Question: in java pls Assignment2C: Useless Conversions: Many message boards and chat applications allow users to set up bots, small scripts that automatically respond when they

in java pls
in java pls Assignment2C: Useless Conversions: Many message boards and chat applications

Assignment2C: Useless Conversions: Many message boards and chat applications allow users to set up "bots, small scripts that automatically respond when they detect certain words in a message. In our opinion, one of the more amusing bots is the Useless Converter bot. When it encounters a standard unit of measure like meters or miles, it converts the value into an unusual format such as "number of sandwiches or length of laptops" and responds with this information. For this lab, you are going to replicate this bot with two different "useless units of measure. You will prompt the user to to enter a number in miles. Then, you will convert that value into the number of refrigerators that would fit in that distance. You will also convert the original value into the number of candy bars that would fit in that distance. Finally, you will print out both numbers to the user. Important Note: For the purposes of this assignment, 1 candy bar converts to 0.0000848327 miles, and 1 refrigerator converts to 0.00105745 miles. You will need to save these values as CONSTANTs, and use them in your equations. Since we can't have half of a refrigerator, you'll need to cast the final result to a long data type after you've performed the conversion. The algorithm output is as shown below, with user input in bold. Save your source code in a file called Assignment2C (with a file extension of .cpp, .cs or java) Sample Output: Enter a number of miles: 14.3 You: I walked 14.3 miles today #fitnessgoals Useless Conversion Bot: Wow, 14.3 miles is 13523 refrigerators long! Useless Conversion Bot: 14.3 miles is also 168567 candy bars long! Useless Conversion Bot: That's a lot

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!