Giter Club home page Giter Club logo

cs4800-as1's People

Contributors

autofire avatar

Watchers

 avatar  avatar

cs4800-as1's Issues

Show current operation (2 hours)

Somehow reflect the current operation in UI.
This is more of a complicated UI feature, but once the UI is working, it should be fairly easy to handle this.

Clearing/Editing Numbers (2 hours)

  • UI button for clearing everything (C)
  • UI button for clearing entry (CE)
  • UI button for clearing last character (backspace)

If we play our cards right, this should be really easy to implement.

Decimal Values (3 hours)

  • Have a '.' button which allows a decimal point to be placed.
  • Should not be able to place more than one decimal point in a number.
  • Make sure all operations work with floating point values.

Feature List

Required

  • Input numbers via UI buttons
  • Provide basic operations
    • Add
    • Multiply
    • Divide
    • Subtract
  • Compute operation (equals)
  • Allow a decimal values
  • Allow numbers to be cleared
    • Clear all (C)
    • Clear entry (CE)
    • Backspace

Optional -- nice to have

  • Keyboard input (numpad, operations, enter, etc.)
  • Better operation display (show previous operand and operation)
  • Some kind of history?
  • Repeat operations

Unknowns/Risks/Issues

  • Limited experience with Rust's UI setup; what exactly is involved in creating a widget?
  • Illegal operations (mostly just divide by zero)
  • Decimal places; can only have one per number, unless decimal is deleted

Operations (3 hours)

  • Have functional UI buttons for each operation
    • Add
    • Subtract
    • Multiply
    • Divide
      • Handle divide by zero
  • Have equals (=) UI button to execute operation
  • Inputting a second operation should carry out first
  • Store (and hide) old operand upon starting an operation

Base UI (8 hours)

  • Field for displaying number
  • Buttons for inputting number
  • Should scale nicely (do something with layouts)
  • Possibly have other buttons, just to make sure we can easily add more. However, they don't need any functionality.

Main challenge is getting this working in Rust

Keyboard Input (3 hours)

If everything is handled correctly, the UI should be calling methods that the rest of the program can access. If this is the case, it should be nothing more than simply calling these when buttons are pressed.

Depending on Rust's stuff, this is might be ridiculously easy... it may only take a few minutes to get working.

Repeat operations (2 hours)

On normal calculators, pressing equals repeatedly does the last operation. We should be able to reproduce that without too much trouble?

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.