Skip to content

Enhancement: Refactor calculator from functional to object-oriented design #16

@Shiza-Yahya

Description

@Shiza-Yahya

The calculator is currently written in a functional style. Refactoring it into an object-oriented design would make the code more structured, scalable, and easier to maintain.

Proposed Changes:

Create a Calculator class with methods like add, subtract, multiply, etc.

Store state (current value) inside the class instead of passing numbers around.

This design will make future extensions (e.g., scientific functions, GUI) easier.

Benefits:

Cleaner organization

Easier maintenance

Better scalability

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions