Skip to content

BrozDa/CodeReviews.Console.Calculator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

ConsoleCalculator Project by C# Academy

Project Link: https://www.thecsharpacademy.com/project/11/calculator

Project Requirements:

First part was guided project based on Microsoft tutorial: https://learn.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-console?view=vs-2022

Additional Challenges

  • Create a functionality that will count the amount of times the calculator was used.
  • Store a list with the latest calculations. And give the users the ability to delete that list.
  • Allow the users to use the results in the list above to perform new calculations.
  • Add extra calculations: Square Root, Taking the Power, 10x, Trigonometry functions.

Challenges Faced and Lessons Learned:

  • File Handling & Persistence – This was my first project involving reading and writing to external files, which introduced me to file I/O operations in C#.

  • JSON Data Handling – I discovered JSON objects and learned why they are commonly used for storing structured data.

  • Refactoring for Flexibility – Initially, the calculator was designed around operations requiring two operands. However, advanced functions (e.g., square root, sine) often require only one operand. I refactored the code so that the operation is selected first, making the calculator more flexible.

  • User Input Validation – I realized the importance of validating user input to prevent errors and crashes, improving overall program stability.

Main Resources Used:

Microsoft tutorial: https://learn.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-console?view=vs-2022

Tim Corey's video regarding working with text files: https://www.youtube.com/watch?v=cST5TT3OFyg&

Various Stack Overflow Discussions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%