Git Product home page Git Product logo

java-currency-converter's Introduction

java-currency-converter

Author: Higinio L.P., Winston T.

program that converts currency from United States Dollar (USD) to Renminbi (RMB), and vice versa

creating Javadocs

run javadoc <filename>.java in a terminal or use the Eclipse 'Project' >> 'Generate Javadoc' which will generate static assets, as well as javascript files that present the program in standard Java documentation format.

  • in this program, it will be done by opening a terminal and typing javadoc Conversion.java
/**
* Format used to generate javadoc entries
* @param lists parameters in javadocs
* @return lists what is returned
* Place comment blocks above the method in use for javadocs to generate documentation
*/

Program Methods/Design:

constant variables (defaults): USD to RMB conversion as 1 to 7.05

  • unitUsdToRmb = 7.05;: 1 USD is equal to 7.05 RMB
  • unitRmbToUsd = 0.14;: 1 RMB is equal to 0.14 USD

user: interacts through the menu and main

presentMenu:

  • presents menu of options to the user and returns the options chosen by the user
  • returns the value to main

main:

  • asks the user to enter the value to be converted
  • reads value
  • calls appropriate currency method
  • prints value returned from conversion
  • formats in 1 decimal digit
  • uses switch statement

convertUsdToRmb:

  • receives double parameter containing value of RMB and returns its equivalent in USD

convertRmbToUsd:

  • receives double parameter containing value of USD and returns its equivalent in RMB

java-currency-converter's People

Contributors

wtsia avatar

Watchers

 avatar  avatar

Forkers

lphmg

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.