write eeve program thet stores the nemes ofr bwo cites in e singie dimension arrey, and their ietitude and longituce in a two-dimension arey. Next calculste the distance between the city in miles and cispiey. INguta: The names of two cities end their ietitudes end iongitudes. Enter the first oty: Enter the second oty: Enter lattuce and iongtuce of frat aity separatad by a space (avampie 28.8 81.2): Enter lattuce and iongtuce of second oity secarated by a scece (aample 288 81.2: The oity namas shouia ba stored in a singa cimansion amray that stores strings, and the attucss and longituces for sach oty should be stored as coubies in a bo-dimanaic may. Outauts: The distance between the two cities in mies, note: repiace o with the cistence calcuieted The datance bateen the two oites is o mias Step 1. Creste en agorithm (eitner fiowehert or pseudococe) thet you will use to write the program. Pisce the eigorithm ine Word document. The program wil heve the main method and e second method to celculete the distence between the two cities. Step 2. Code the program in Eclipse to prompt for the two cites end their letituces / longitudes. Next, use the calcDistance method provided on pege 2 to compute the distance between the twe cities in miles. The method caicDistance will returne double value equal to the distance between the cities. The distance in miles must be formetted and dispiayed to two cecimal pieces in the main method using the print command.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 9E
Question

confused

Chapter 8 Project
Project Name: Chpts_Project
Class Name: Chpts_Project
write s lave program thet stores the nemes of two cites in e singe dimension erray, and their ietitude
and longituce in a two-dimension arrey. Next calculete the distance between the city in miles and
cispley.
Inguts: The names of two cities and their ietitudes and iongitudes.
Enter the first oity.
Enter the second coity:
Enter lathuce and longtuce of frat city separatad by a space (avampie 28.8 81.2):
Enter lattude and iongtude of second cty separated by a spece (example 28.8 81.2:
The oty namas anould ba stored in a singia dimansion aray that stores strings, and the latucss and
longitudes for each oty ahould be stored as coubies in a bwo-dimenalon amay.
Outouts The distance between the bwo cities in miles, note: repiece o with the distance calculeted
The distance batween the two oites is o milas
Step 1. Creste en egorithm (eitner flowchert or pseudocode) thet you will use to write the program.
Fisce the sigorithm ina Word document. The program will heve the main method and s second method
to calculate the distance between the two cities.
Step 2. Code the program in Eclipse to prompt for the two cites and their letitudes / longitudes. Next,
use the caicDistance method provided on pege 2 to compute the distance between the two cities in
miles. The method caicDistance will return e double value equal to the distance between the cities.
The distance in miles must be formetted and dispiayed to two decimel pleces in the mein method using
the printt commend.
Transcribed Image Text:Chapter 8 Project Project Name: Chpts_Project Class Name: Chpts_Project write s lave program thet stores the nemes of two cites in e singe dimension erray, and their ietitude and longituce in a two-dimension arrey. Next calculete the distance between the city in miles and cispley. Inguts: The names of two cities and their ietitudes and iongitudes. Enter the first oity. Enter the second coity: Enter lathuce and longtuce of frat city separatad by a space (avampie 28.8 81.2): Enter lattude and iongtude of second cty separated by a spece (example 28.8 81.2: The oty namas anould ba stored in a singia dimansion aray that stores strings, and the latucss and longitudes for each oty ahould be stored as coubies in a bwo-dimenalon amay. Outouts The distance between the bwo cities in miles, note: repiece o with the distance calculeted The distance batween the two oites is o milas Step 1. Creste en egorithm (eitner flowchert or pseudocode) thet you will use to write the program. Fisce the sigorithm ina Word document. The program will heve the main method and s second method to calculate the distance between the two cities. Step 2. Code the program in Eclipse to prompt for the two cites and their letitudes / longitudes. Next, use the caicDistance method provided on pege 2 to compute the distance between the two cities in miles. The method caicDistance will return e double value equal to the distance between the cities. The distance in miles must be formetted and dispiayed to two decimel pleces in the mein method using the printt commend.
public static double ceicoistance (double 1D lis) {
N computa the dstancs
double distance = Man.sorpovaluevalua + yvalueryvaua):
retum cistance:
Stap 2 Test yaur aragram by computing the slatance between Orlands and Tampa The latihusE an
langitutes are pravlded below. Ua the Sels itteal In Windowe ora simlar teel on the Mac te cutan
parta the ielipen Canesa sutaut winsau Ints the ama Ward secumant a the agerithm in Sta 1.
ad Dt O Cne tuta Heky
Enter the tirt eit riane
ter the d sity
Enter letitde end Sengitde of 1rat dty seperete
latitude and ngitade of sedsity r
he etance between the te cities a 19.31 ien
ŠAMPLE,
(enede 204 : 2 4
( e aE.E .a) 7.
Information an haw alscaanca calcuiatas tha datanca in milas.
The math farmula for tha slatanca bata tua salnte :
dirtance
4, va)
aterance in langihude
eittenca in lathute
Ts canvart the sieranca in lathude ta mlias, multply by a
Te canuart the sifterenca in langituda ta mila, muitiply by 5
Transcribed Image Text:public static double ceicoistance (double 1D lis) { N computa the dstancs double distance = Man.sorpovaluevalua + yvalueryvaua): retum cistance: Stap 2 Test yaur aragram by computing the slatance between Orlands and Tampa The latihusE an langitutes are pravlded below. Ua the Sels itteal In Windowe ora simlar teel on the Mac te cutan parta the ielipen Canesa sutaut winsau Ints the ama Ward secumant a the agerithm in Sta 1. ad Dt O Cne tuta Heky Enter the tirt eit riane ter the d sity Enter letitde end Sengitde of 1rat dty seperete latitude and ngitade of sedsity r he etance between the te cities a 19.31 ien ŠAMPLE, (enede 204 : 2 4 ( e aE.E .a) 7. Information an haw alscaanca calcuiatas tha datanca in milas. The math farmula for tha slatanca bata tua salnte : dirtance 4, va) aterance in langihude eittenca in lathute Ts canvart the sieranca in lathude ta mlias, multply by a Te canuart the sifterenca in langituda ta mila, muitiply by 5
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,