Code Monkey home page Code Monkey logo

payment-tracker's Introduction

Payment Tracker

This is a Java program that keeps a record of payments.

Initially, the program loads the following data from an initial input file:

e.g.

USD 1000
HKD 100
USD -100
RMB 2000
HKD 200

Once started the program reads additional lines from the console.

The program also outputs a grand total of the payments by currency once a minute

for example:

USD 900
RMB 2000
HKD 300

(internally this is done by a scheduler - using a 3rd party scheduling library - Quartz Scheduler).

Optionally, a filename can be also be specified in the console on program startup.

for instance:

java -jar PaymentTracker.jar optional_input_file.txt

The user can then enter more lines into the console by typing a currency and amount and pressing enter.

Every minute, the console outputs the net amounts of each currency. Should the net amount be 0, that currency is not displayed.

When the user types "quit" or "q", the program exits.

File Format

The format of the file is one or more lines with Currency Code Amount like in the Sample input above, where the currency is any uppercase 3 letter code, such as USD, HKD, RMB, NZD, GBP etc.

payment-tracker's People

Contributors

colinbut avatar

Watchers

 avatar  avatar

Forkers

lanru2001

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.