Skip to content

Final Calculator implementation ready for review - #35

Closed
Brandonscodedata wants to merge 1 commit into
the-csharp-academy:mainfrom
Brandonscodedata:main
Closed

Brandonscodedata wants to merge 1 commit into
the-csharp-academy:mainfrom
Brandonscodedata:main

Conversation

@Brandonscodedata

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

🚀 Project Submitted!

Thanks for submitting your project! I will review it soon.

📋 Please check the dashboard to make sure the project is marked as Pending.

⚠️ If it's not marked as pending, submit it manually using the URL for this PR.

@TheCSharpAcademy

Copy link
Copy Markdown

@Brandonscodedata Sorry about the delay. Project approved! 😄✅ I'm glad you did a bunch of the challenges, that's what takes your learning to the next level!😊

👩‍🏫Feedback

🔍️There’s also a small logic issue around reusing history. The following structure:

if (historyInput == "d")
{
    ...
}

if (historyInput == "u")
{
    ...
}
else
{
    usePreviousResult = false;
}

means choosing "d" subsequently reaches the else belonging to the second if. An else if structure would make the menu flow clearer and less error-prone.

🕵️‍♀️Also, have a look at our style guide since there are a few issues in your code. e.g. lots of unused usings and unecessary comments, as per picture below. You can read our code conventions here🤓.

image

🧐Challenges Review

✅ Calculation history is implemented with the CalcData model and a List.
✅The user can clear their calculation history.
✅A previous calculation result can be selected and reused in the next calculation.
✅Additional operations were added, including square root, nth root, powers of 10, sine, cosine, tangent, and logarithms.

🗺️ Suggested next step

I noticed that you already complete a few courses. I'd highly recommend taking our LINQ Fundamentals course next. LINQ is one of the most important tools in modern C# and becoming comfortable with it will make your code much cleaner and more expressive.


👪Oh and if possible join our Discord Community and add your username to your profile so you can be part of the community as well. 😁


☕If you like our roadmap, please consider buying us a coffee. We appreciate your help 🙂

Overall great work!✋🏻Looking forward to seeing your next projects!

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.

2 participants