Completed

I would like to hire a Java Developer

The attached data file represents the stations in the Long Island Railroad system. Each line in the file represents a station. There are six blank-delimited fields for each station, a unique three-digit station ID, the station name, the name of the branch of the LIRR to which the station belongs, a semicolon-delimited list of station id's to which this station is connected, the station's latitude, the station's longitude, and a field indicating the source of the information, which is not relevant to this assignment.

Create a simple GUI application that draws a map of the stations of the Ronkonkoma branch by scaling the longitude to a x-coordinate, and the latitude to a y-coordinate (assume that longitude and latitude are linear), and using that point as the baseline point for displaying the station name. A font larger than 12 pt may cause the western station names to overlap. Use margins to give the display a pleasing appearance. The eastern margin will have to be larger than the western margin to accommodate the length of the eastern-most station name.

Remember that latitudes increase going north but JPanel y-coordinates increase going down. The display should handle resizing. The Ronkonkoma map should look like the attached screen shot.

For an extra 100 points

Add a JComboBox to the bottom of the JFrame to select any LIRR branch

When the combobox changes value, rescale and redraw the map

Connect adjacent stations with a line so we see an approximation of the track on the map.

public class AssignLIRRBranches implements Runnable

{

static final String title = "LIRR Map";

static final String CITY_TERMINAL_ZONE = "City_Terminal_Zone";

static final String MONTAUK = "Montauk";

static final String PJ = "Port_Jefferson";

static final String RK = "Ronkonkoma";

static final int width = 1200;

static final int height = 600;

JFrame application;

public void run()

{

/* build the GUI */

}

void readStations(String path)

{

/* read all stations */

/* construct and save Station instances */

}

public static void main(String[] args)

{

String path = "[login to view URL]";

AssignLIRRBranches ars = new AssignLIRRBranches();

[login to view URL](path);

[login to view URL](ars);

}

class Station

{

static final int NAME = 1;

static final int BRANCH = 2;

static final int LAT = 5;

static final int LONG = 4;

String[] data;

double latitude;

double longitude;

Station(String d)

{

/* construct a Station instance */

}

String getName()

{

/* station name accessor */

}

String getBranch()

{

/* station name accessor */

}

double getLatitude()

{

/* station latitude accessor */

}

double getLongitude()

{

/* station longitude accessor */

}

boolean isBranch(String branch)

{

/* branch comparator */

}

}

class MapPanel extends JPanel implements ComponentListener

{

Font mapFont;

boolean resized = false;

Color mapColor = [login to view URL];

String currentBranch;

double minLong, minLat, maxLong, maxLat;

MapPanel(String br)

{

/* construct the MapPanel */

}

void extents()

{

double td;

minLong = Double.MAX_VALUE;

minLat = Double.MAX_VALUE;

maxLong = -Double.MAX_VALUE;

maxLat = -Double.MAX_VALUE;

/* calculate minimum and maximum longitude and latitude for staions of the current branch */

}

void setBranch(String br)

{

/* change the branch */

}

public void paint(Graphics gr)

{

Graphics2D g2 = (Graphics2D)gr;

if (null == mapFont)

/* get the desired font and calulate margin values */

else

/* set the current font */

if (resized)

{

/* rescale, taking into account margins */

}

/* set the color */

/* iterate through the stations */

/* for each station in the current branch */

/* calculate the corrdinates and draw the station name */

}

public void componentResized(final ComponentEvent componentEvent)

{

}

public void componentMoved(final ComponentEvent componentEvent)

{

}

public void componentShown(final ComponentEvent componentEvent)

{

}

public void componentHidden(final ComponentEvent componentEvent)

{

}

}

}

Skills: Java

See more: java developer for hire johannesburg, java developer for hire, resize image width height values java, image file width height java script, asp developer bid hire, cover letter software developer java, game developer java money, iphone developer cost hire, fxcm developer java, production support developer java, isbackend developer java, iphone developer work hire, developer java tomcat hosting cvs paypal, flv file width height, flv header width height, buddypress developer website hire, moments image detection width height blob, shirt developer java, width height flv, flv width height reading

About the Employer:
( 1 review ) staten island, United States

Project ID: #14001344

Awarded to:

wangbeizou

Hello. How are you today. I have read and understood the project. I have strong knowledge in Data structures and Algorithms. And I'm expert in Java ,C/C++,C#, Python ,PHP etc. I'm interested this project. So, fi More

$105 USD in 2 days
(108 Reviews)
6.0

11 freelancers are bidding on average $139 for this job

juniadsarfraz

Java EXPERT here. Contact me with more details and clean code. Thanks, Junaid

$155 USD in 3 days
(117 Reviews)
6.7
abhijitbuet

We do this type of projects in regular basis. Please inbox us. We offer 80 USD in 1 day. Best services guaranteed.

$80 USD in 3 days
(225 Reviews)
6.6
ifriends710

Hello. I am a GIS expert and Web&Mobile(iOS&Android) developer. Since 10 years before I have been developing GIS applications. I graduated GIS special education course and I have rich experiences for development More

$250 USD in 3 days
(3 Reviews)
5.6
FutureTechno1

Hi there, I’d like to be considered for your job position. I’m a Software Developer with a strong background developing desktop application. I can turn your requirement in a way that represents your brand and appeal More

$155 USD in 3 days
(16 Reviews)
5.3
algispetkuns

A proposal has not yet been provided

$70 USD in 2 days
(45 Reviews)
5.3
tgchauhan1711

Hello sir I am expert in Java and J2ee. Please see my profile and [login to view URL] give me more details about your project. thank you

$50 USD in 4 days
(11 Reviews)
5.0
MingFuCui

Dear Sir. I'm very interested in your job post involving these skills. I have 7 years experience in JAVA. I have consistently delivered projects on time and under budget, which has earned us many positive ratings More

$250 USD in 3 days
(3 Reviews)
4.0
MegaAlex

Hey! I would be more than happy to work on this project. The requirements are clearly stated. I am able to start working on this today and will aim to deliver as soon as possible. If you have any questions, feel fre More

$155 USD in 3 days
(2 Reviews)
2.1
kusen26

I believe I'm the best candidate for this program. I actually have done a project similar to these in the past which involved developing a bus simulation. This project is quite similar with extra kinks such as; graphin More

$100 USD in 3 days
(0 Reviews)
0.0
$155 USD in 3 days
(0 Reviews)
0.0