Giter Club home page Giter Club logo

file-read-write's Introduction

file-read-write

HW Week 8

This week we will work with File I/O. This can be a little troublesome using IDEs as they can alter your working directory. Because of this, you need to be careful with where and how you look up files. It is generally easier to find a file reliably by using the classpath. There is sample code for you in this project that shows how to do that.

FileParser

Complete the code in the FileParser class so that the file is read line by line. Trim each line and if it is not empty, add the line to an ArrayList to return.

ListFileWriter

Complete the code in the ListFileWriter class so that it will write each non-empty item from the ArrayList to the file at the path specified. Make sure you do not write empty lines.

Main

Once you have both classes completed and the tests in the main methods show no errors, update the Main class so that it reads the sampleData into an ArrayList by using the FileParser class, and then use the ListFileWriter to write that into a new file.

GitHub Info

Repository: https://github.com/htc-ccis2595/file-read-write

You need to fork this repository and submit a pull request to turn in the assignment. Please post a screenshot of the pull request to the D2L dropbox. The dropbox is mainly used to communicate due dates, not for storing the completed work. You do not need to upload the project to D2L, only to GitHub.

file-read-write's People

Contributors

mbmosman avatar jordovolk avatar

Watchers

James Cloos 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.