Skip to content

Conversation

Adi-Sin101
Copy link

This pull request introduces two new classes, Calculator and Student, to the src/Features directory. The Calculator class provides basic arithmetic operations, while the Student class models student data with proper encapsulation, constructors, validation, and utility methods.

New feature: Calculator utility

  • Added Calculator class with methods for addition, subtraction, multiplication, and division (with division-by-zero handling).

New feature: Student model

  • Added Student class with fields for id, name, email, department, and gpa, including no-arg, parameterized, and copy constructors.
  • Implemented getters and setters with GPA validation, builder-style methods for chaining, and overrides for toString, equals, and hashCode.

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.11%. Comparing base (0ff2c06) to head (d25a7d2).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6489      +/-   ##
============================================
- Coverage     75.11%   75.11%   -0.01%     
+ Complexity     5575     5574       -1     
============================================
  Files           687      687              
  Lines         19318    19318              
  Branches       3732     3732              
============================================
- Hits          14511    14510       -1     
  Misses         4245     4245              
- Partials        562      563       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DenizAltunkapan
Copy link
Collaborator

A calculator ist not considered as an algorithm. Also, there already exists some kind of calculator:
https://github.com/TheAlgorithms/Java/blob/master/src/main/java/com/thealgorithms/maths/MathBuilder.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants