FE22-js2-mp4-eleonora-nocentini

Calculator Project

A simple calculator application built using TypeScript and Parcel bundler. This calculator allows users to perform basic arithmetic operations with a user-friendly graphical interface.

Table of Contents

  • Features
  • Requirements
  • Installation
  • Usage
  • Contributing
  • License

Features

  • Basic arithmetic operations (+, -, *, /)
  • User-friendly GUI with numbers 0-9 and arithmetic operators
  • Written in TypeScript
  • Bundled with Parcel
  • At least one image included in the repo

Requirements

  • Node.js
  • npm
  • Parcel bundler
  • TypeScript

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/calculator-project.git
cd calculator-project
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Start the development server:
npm run dev

Usage

  1. Open the calculator application in your web browser.
  2. Click on the numbers and arithmetic operators to form an expression (e.g., 15 / 3).
  3. Press the = button to perform the calculation.
  4. The result will be displayed on the screen.

Contributing

  1. Fork the repository on GitHub. 2.Clone your fork locally:
git clone https://github.com/yourusername/calculator-project.git
cd calculator-project
  1. Create a new branch for your feature or bugfix:
git checkout -b my-new-feature
  1. Make your changes, and commit them with a descriptive commit message:
git add .
git commit -m "Add my new feature"
  1. Push your branch to your fork:
git push origin my-new-feature
  1. Create a Pull Request on GitHub, comparing your fork's branch with the original repository's main branch.

Please ensure that your code follows the project's coding style and that all tests are passing before submitting a Pull Request.

Acknowledgement

  • The creators of TypeScript for providing a strongly-typed language built on JavaScript
  • The maintainers of Parcel for creating a fast and easy-to-use bundler
  • All contributors who have helped improve and maintain this project

Future Improvements

  • Add support for more advanced arithmetic operations (e.g., exponentiation, square root, logarithms)
  • Implement a history feature to store past calculations
  • Allow keyboard input for faster number and operator entry
  • Create unit tests for each component to ensure code reliability

We welcome any suggestions and contributions to further enhance the project. Please feel free to open an issue or submit a Pull Request with your ideas.