Find Jobs
Hire Freelancers

Java Grid-Like Location Program

$10-30 USD

Completed
Posted about 9 years ago

$10-30 USD

Paid on delivery
The Drunkard's (Random) Walk. Imagine you live on an infinite grid of streets where locations are represented as integer pairs (avenue,street). Negative numbers are okay in this example. Now consider a drunkard that randomly picks one of four directions at an intersection and then stumbles to the next intersection doing the same and so on. Write a class Drunkard to simulate this behavior given the drunkard's initial position. Your Drunkard class should have as instance variables the drunkard's current avenue (x location) and current street (y location). Your class should have a method called step( ) that moves the drunkard to the next randomly chosen adjacent intersection. Your class should have another method called fastForward(int steps) that takes an integer as input (call it steps) and moves the drunkard steps intersections from his current location. Your class should have a method getLocation( ) that returns a String indicating the drunkard's current location. Finally your class should have a method called howFar( ) that reports the drunkards distance in blocks from where he started calculated using the Manhattan distance metric ([login to view URL] ). Must be completed same day.
Project ID: 7414176

About the project

5 proposals
Remote project
Active 9 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I have read the requirements and I would like to do this project if given the opportunity. I am a computer science practitioner and having the "Java and Algorithms Certification Badge" in my profile gives me confidence and assurance that I can deliver you the project as required. Let me know if you are interested so I can start. Thanks.
$20 USD in 1 day
4.9 (536 reviews)
6.9
6.9
5 freelancers are bidding on average $19 USD for this job
User Avatar
Hi there, I've already read and understood the project description, and I'm really interested in doing this project. Would you please initiate a chat for further discussion? So really hope to have chance to work with you, thanks for your consideration! Regards.
$20 USD in 0 day
5.0 (26 reviews)
4.0
4.0
User Avatar
A proposal has not yet been provided
$20 USD in 1 day
4.8 (5 reviews)
1.9
1.9
User Avatar
This project is easy and I can complete it quicky . I have good programming experience and I rank at top 1% in programming website like Codeforces and Tocopder with user-name : shank_punk
$15 USD in 1 day
5.0 (2 reviews)
1.4
1.4
User Avatar
Hi, I'd be happy to help you with your Java program. I'm a qualified Mechatronics engineer with years of software development experience, and a critical eye for detail and quality. I can complete the project right away, and my work is always of the highest quality. Please let me know if you have any questions. Best regards, Matthew Meyer
$20 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED STATES
Forest Hills, United States
5.0
4
Payment method verified
Member since Apr 2, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.