Code Monkey home page Code Monkey logo

java-mod-3-project-file-io's Introduction

Project Work Time - File IO

Learning Goals

  • Spend some time working on your project.

Project Work Time

Now that we have learned a little more about file IO in Java, it's time to apply this new knowledge to our projects!

Provide an option for command-line arguments to insert a list of airports from a file. Consider the following instructions:

  • Modify the AirportReservationDriver class.
    • Write a conditional that looks to see if a file was passed in via the command-line.
    • If a file exists, read the file in.
      • Create a new method in the driver class to read in a file.
      • The file can be formatted however you want to format it. It is suggested you use either a CSV or a JSON format though, so you can easily map it back to the Airport class.
      • The list of airports should consist of the following fields:
        • Airport code.
        • Airport name.
        • Airport location.
        • Set of cities.
        • Example:
          • Airport Code: DEN
          • Airport Name: Denver International Airport.
          • Location: Denver, Colorado.
          • Some of the cities with services from the Denver International Airport:
            • Durango, Colorado.
            • Baltimore, Maryland.
            • Portland, Oregon.
            • Louisville, Kentucky.
            • Paris, France.
      • The new method that reads in the file should return a list of airports.
      • Don't forget to validate the airport code is in the proper format of three uppercase letters.
    • If the file does not exist or is not passed in via the command-line, proceed as normal.
  • Write the unit tests to test the reading in of a file.
  • Tips:
    • Refer back to the labs in this past section as needed.
    • Refer back to the unit testing section to help you write the unit tests.
    • Refer to the Java documentation as needed. Below are some resources that may help you.

Resources

java-mod-3-project-file-io's People

Contributors

kcleland0818 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.