How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask Leela-TheProgrammer Your Own Question

Leela-TheProgrammer
Leela-TheProgrammer, Computer Software Engineer
Category: Programming
Satisfied Customers: 474
Experience:  Post Grad in CS (Gold Medal)
21067471
Type Your Programming Question Here...
Leela-TheProgrammer is online now
A new question is answered every 9 seconds

I need help on my Java program, the purpose of the program

Customer Question

I need help on my Java program, the purpose of the program is given n and the location of each store in terms of latitude and longitude, then report the closest pair of stores(in alphabetical order) and the distance between them to the nearest 0.1km. But
when I test the program with a very large number of n, It will promote a OutOfMemoryError: Java heap space, and I also keep getting a wrong answer from other test cases as well, I think there must be something wrong with my calculation of latitude and longitude.
I've been told that the latitude is unique in the range [-90,90] degrees but -180 and 180 longitude are the same, so I should think hard about which to map to which of the planar coordinates as in class, but I've no idea what is this exactly meaning, I am
assuming it have to do with the fact that if i have a point on the very left edge and one on the right edge then they could also be candidates. I've attached a small test case which is the sample input and output, and also a large test case which is the one
that cause a OutOfMemoryError to my program...Can anyone give me a help on this please ? Thank you
Submitted: 1 year ago.
Category: Programming
Expert:  LogicPro replied 1 year ago.

Hi

I will check it and reply you

Customer: replied 1 year ago.
Thank you.
Expert:  LogicPro replied 1 year ago.

Welcome

Customer: replied 1 year ago.
Hello LogicPro,
Please let me know if you are working on it already...
Thank you
Expert:  LogicPro replied 1 year ago.

What is the deadline for this?

Customer: replied 1 year ago.
Can you give me this before 29 August 9 P.M. EDT ?
Expert:  LogicPro replied 1 year ago.

ok, I will try my best.

Expert:  LogicPro replied 1 year ago.

My apologies, I tried but lost. I am out of ideas and opting out for other Professionals to answer. Please wait. You will be notified by email as soon as any Professional joins you.

I would be happy to help you with your other questions though.

Thank you for your patience.

Expert:  Leela-TheProgrammer replied 1 year ago.

Hi,

Thanks for using JustAnswer. This is Leela and I can help you with the question. I had a look at the program. Do you still NEED help with the program? If so, I can work on this and deliver by 29th Aug 9 PM EDT.

PLEASE CONFIRM IF YOU NEED HELP ON THE QUESTION so that I can work and provide you the solution.

Thanks,

Leela

Customer: replied 1 year ago.
No, I am no longer need help, thanks
Expert:  Leela-TheProgrammer replied 1 year ago.

Thanks for the confirmation. All the best.

Related Programming Questions