Implement basic algorithms and appropriate technologies

Assignment Help JAVA Programming
Reference no: EM133230381

Project

Instructions
You must work individually on this project. You are allowed to think through this project with other students, however, remember that each student should be fully engaged and fully understand all work done, so that you can contribute effectively and learn from others in the process. You then leverage on those insights to challenge yourself to complete this project.

Objectives
The objectives of this project work are for you to demonstrate that you can:
- Define classes, fields, constructors, methods in Java and error handling
- Use appropriate types, including collections and justifiable data structures
- Implement basic algorithms and appropriate technologies (e.g., through APIs)
- Write a main method including console I/O
- Document your solution with Javadoc

Problem Description

You have been provided with a database of airports, airlines and routes. Your task is to write a programme which, given a start city (e.g., Accra, Ghana) and a destination city (e.g., Winnipeg, Canada), outputs a series of flights that take a passenger from the start city to the destination city, such as in the example below.
1. BA from ACC to LHR 0 stops
2. DL from LHR to MSP 0 stops
3. DL from MSP to YWG 0 stops. Total flights: 3
Total additional stops: 0

(To understand the output, note the following: As specified in the data files provided, "BA" and "DL" are the airline codes for British Airways and Delta Airlines respectively. "ACC" is the airport code for Kotoka International Airport in Accra Ghana, "LHR" is the airport code for London Heathrow Airport, "MSP" is the airport code for Minneapolis-Saint Paul International Airport and "YWG" is the airport code for James Armstrong Richardson International Airport in Winnipeg, Canada.) The input information (start and destination cities) will be provided to your application in a text file, and your programme will also provide the output information in a text file.

At a basic level, your programme should find a valid route between the two cities. For an extra challenge, your programme can find an optimal route between the two cities. Optimality could be judged either in terms of the number of flights or in terms of the distance covered by the route (you'll need to use the Haversine formula to compute the distance between two points with given latitude & longitude coordinates).

Program Execution Specifications

Your programme should be written in Java, and it should be such that it can be executed by taking the input filename, process it and generate the result in an output file.

Note that your programme will use the data files provided - do not change the names of the data files. Your programme should write its results to an output file whose name is the name of the input file, with "_output" inserted between the file name and the
extension. E.g., if the input file is "accra-winnipeg.txt", the output file would be "accra- winnepeg_output.txt". For simplicity, you can assume the extension of the input and output files are always .txt. The format of the data files, input file, and output file are described in the following sections.

Data File Formats

You have been provided with three data files in CSV (comma-separate-value) format, Note that CSV files are simply plain text files in which the data values on each line are separated by commas. You can read such files in your Java program like you would read any text file. You can view such files with a text editor (such as Notepad). You can also use Excel to view such files in a nice tabular format.

The data files are:
• airports.csv:
o A database of airports spanning the globe. Each entry contains the following information: Airport ID, Name, City, Country, IATA code, ICAO code, Latitude, Longitude, Altitude, Timezone, DST (Daylight savings time), Tz database time zone, Type, Source of this data.
• airlines.csv:
o A database of airlines. Each entry contains the following information: Airline ID, Name, Alias, IATA code, ICAO code, Callsign, Country, Active
• routes.csv:
o A database of routes/flights between airports on various airlines spanning the globe. Each entry contains the following information: Airline code, Airline ID, Source airport code, Source airport ID, Destination airport code, Destination airport ID, Codeshare, Stops, Equipment

More details about the meaning of each of the data entries can be found on the website above.

Input File Format
The input file should have two lines: the start city and country should be on the first line, and the destination city and country on the second line. There should be a comma between the city name and the country name. For example:

Sample input file:
Accra, Ghana Winnipeg, Canada

Output File Format
Your output file should have a numbered list of flights of the form "<airline code> from
<airport code> to <airport code> n stops" where n is the number of stops made by the flight (as indicated in the routes.csv file). The first flight must depart from the start city and the last flight must arrive in the destination city. Your file should have two additional lines indicating the total number of flights needed and the total number of additional stops made on those flights. Optionally, you file can include the total distance covered by the flights. If your programme computes the optimal route, you can also indicate the optimality criteria (distance or number of flights)

Sample output file:
1. BA from ACC to LHR 0 stops
2. DL from LHR to MSP 0 stops
3. DL from MSP to YWG 0 stops. Total flights: 3
Total additional stops: 0

Sample output file with optional entries:
1. BA from ACC to LHR 0 stops
2. DL from LHR to MSP 0 stops
3. DL from MSP to YWG 0 stops. Total flights: 3
Total additional stops: 0 Total distance: 10453km Optimality criteria: flights

Rules of the Challenge

1. Solutions must be coded in Java. Standard built-in classes and libraries can be used (e.g. file reading libraries, the math library classes in the java.util package in Java). If planning to use any non-standard packages, it is best to enquire first about whether the package will be allowed.

Attachment:- Project.rar

Reference no: EM133230381

Questions Cloud

Components of product innovation : You will walk us through one of the above components of Product Innovation and highlight a current company's experience with one of the above components.
Organisations to stay competitive in global marketplace : Porter and Heppelmann propose the "new lean" being implemented by organisations to stay competitive in the global (digital) marketplace. The "new lean" will aim
Differences in employment relations system : What are the key differences in the employment relations system in Australia compared to the ER systems in Asia?
List which of the national patient safety goals apply : List which of the National Patient Safety Goals apply to the case study that you have selected. Describe the medical error in the case study
Implement basic algorithms and appropriate technologies : CS 313 Intermediate Computer Programming Define classes, fields, constructors, methods in Java and error handling - Write a main method including console
Analyse the effectiveness of backward integration : Analyse the effectiveness of backward integration. Provide examples to substantiate your response
Monetary damages for breach of fiduciary duty : No director of this corporation shall be liable to this corporation or its stockholder for monetary damages for breach of fiduciary duty
What options would be morally justified in the christian : Death and Dying Case Study - Given the above, what options would be morally justified in the Christian worldview for George and why
Identifying strategic options : Identifying strategic options and the selection of the best way that resources should be allocated in order for an organisation to reach its objectives.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd