Week 4
Step 1. double-click the “C” symbol on the calculator.
Enter the code below after the line that appears private: System::Void btnClear_Click(System::Object^ sender, System::EventArgs^ e) {:
txtDisplay->Text = “0”;
Step 2. Double-click the “CE” symbol on the calculator. Enter the code below after the line private: System::Void btnClearEntry_Click(System::Object^ sender, System::EventArgs^ e) {.
txtDisplay->Text = “0”;
Step 3. Double-click the “±” symbol on the calculator.
Enter the code below after the line private: System::Void btnPlusMinus_Click(System::Object^ sender, System::EventArgs^ e) {.
if (txtDisplay->Text->Contains(“-“))
{txtDisplay->Text = txtDisplay->Text->Remove(0, 1);}
else
{txtDisplay->Text = “-” + txtDisplay->Text;}
Step 4. Double-click the “⌫” character on the calculator.Enter the code below after the line private: System::Void btnSpace_Click(System::Object^ sender, System::EventArgs^ e) {.
if (txtDisplay->Text->Length > 0)
{txtDisplay->Text = txtDisplay->Text->Remove(txtDisplay->Text->Length – 1, 1);}
So, you have finished writing the code for the calculator in C++.
At the link below you can see how all the buttons of the calculator work and work:
Presentation of projects (presentation)
Students should present their finished projects.
Conclusion
The C++ language is actively used in programming. This is because it is flexible and fast. More importantly, it remains the most efficient programming language that can solve any programming problem.
In this project students have developed their interdisciplinary skills together with C++ programming for 4 weeks. The idea behind this project is to create a calculator in C++ using Visual Studio. Students gained some level of new knowledge in C++.
Assessment
PBL evaluation criteria:
Problem based learning (problem-oriented learning) is a learning method in which students acquire knowledge and skills by working on one project for 3 or 4 weeks to research and find an answer to a genuine, interesting and complex question, problem or challenge (then follow the PBL Rubrics link to the Rubrics).
Reflection

