Question: Please help me, this class uses java inside of eclipse.. please help me Write a program to allow a user to enter the name of
Write a program to allow a user to enter the name of a starting city and a destination city. Output the mileage between cities and an estimate of the total number of gas stations on the way. The number of gas stations between two cities Is the sum of the number of gas stations In the starting city and the number of gas stations in the destination city, all divided by 3 (since many of the stations will likely not be on the road between the two cities). Store the mileage between 8 different cities in a 2D array of integers. Choose names of cities in Texas. Store the number of gas stations in each city in a 10 array. Your program should first print a title showing the name of the program, version number and copyright notice with author name (insert your name as the author). Also, print a list of the cities in the database so the user knows what cities they can search. Look up the mileage between the cities on the Internet and use the values you find in your program. You are free to create your own estimate of how many gas stations are in each city. For example, if Houston has 100 gas stations and Beaumont has 20, then the output of your program should look something like. City Mileage w/Gas Stations ver. 1.0 (C) 20017 First Last The cities ir. the database are: 1. Dallas (85 stations) 2. Houston (100 stations) 3. Beaumont (20 stations) 4. Austin (75 stations) 5. SI Paso (44 stations) 6. Lubbock (59 stations) 7. Texarkana (37 stations) 8. Corpus Christi (39 stations) Enter the starting city: Beaumont Enter the destination c;ty: Houston Mileage: 75 miles Estimated # of gas stations: 40 Put your name, the class (COSC 1336) and the title of the assignment in comments at the top of the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
