Question: i need help making a calculator program app using C + + and wxWidgets. I have posted the guide for making the calculator program below.

i need help making a calculator program app using C++and wxWidgets. I have posted the guide for making the calculator program below. I need a step by step solution.
The objective of this lab is to further familiarize yourself with using the wxWidget's library, as well as how mockup a design and read documentation. First, you will be creating the User Interface (UI) for a calculator application. Then you will work on adding the funcionality of some of your buttons through event handlers.
This assignment should be completed in two separate branches: One for UI and one for Events. When a branch is complete, merge it back into your main branch.
Project and Repository Setup
1. Follow this link to Github Classroom Calculator-Chris
2. Select your name from the list.
3. Click button to Accept this Assignment.
4. Clone the classroom repository to your machine. Your submission should be done with your classroom repository, not a personal/private repository.
5. Compile and run the project to make sure everything is working properly before you begin.
6. Make commits as you complete your work and push changes to the Github classroom repository when complete.
IMPORTANT:
Like any assignment, verify that your completed assignment was uploaded correctly by cloning the classroom repository to a different location on your computer and trying to run it.
Part One: User Interface Instructions
Using a pencil and paper, draw out a few designs for a calculator application.
The application will require the following buttons:
A text control
Numbers 0-9
Binary Operators: +,-,*,/,%(as modulo)
Unary Operators: sin, cos, and tan (either degrees or radians are ok to use).
Equals: =
Clear
Backspace/delete
Decimal (adds a decimal point to the text control)
Negative (adds a negative symbol to the text control)
Create a new branch from your existing main branch. Give the branch a name that will be recognizable to you later as UI work.
On your newly created branch, use a text control and buttons to create a layout based on one of your designs.
Your buttons should not function yet. You'll be adding functionality in your Events branch in Part 2 of this assignment.
Part One Complete
Once Part One is completed, merge your UI branch into your main branch. You may push if you want.
UI Mockup Image
Take a picture/screenshot of your design(s) and submit via the FSO submission box.
Next Steps
After Part One is complete, proceed to Part Two.
Part Two: Event Handling Instructions
Familiarize yourself with the wxWidgets events documentation . Read about event tables and binding.
Create a new branch from your existing main branch. Give the branch a name that will be recognizable to you later as events works.
On your newly created branch, implement an event table that handles click events for every button. Do not use bind for this lab.
Button Functionality
When the following buttons are pressed, their button label or corresponding symbol will be added to the text control.
Numbers 0-9
Binary Operation Buttons (+,-,*,/,%)
Decimal Button
Negative Button
Unary Operation Buttons (Sin, Cos, Tan)
Clear Button
The clear button should fully clear the text box and the backspace button should remove the last character in the textbox. The backspace button should repeat this behavior until there's nothing left in the textbox.
Backspace/Delete Button
The backspace button should delete the last character in the text control. Repeatedly pressing the backspace button should continue deleting each character until the text control is empty. The program should not crash if the text control is empty.
Equals Button
The = button will attempt to calculate whatever string is contained within the text control, clear it, and display the result in the text control.
The program should not crash if the text box is empty or if the text control contains an invalid expression.
Calculations
Implement simple calculations (+,-,*,/,%(mod)). At the very least, you should be able to perform each of these math operations on two numbers. (2+2 should work, but 2+2+2 does not need to just yet).
Review string parsing concepts to tokenize the string in your textbox into separate tokens. If "5.5*-20" is in your textbox, pressing = should parse "5.5" and "-20" as floating point values and "*" as the operation to occur between those two values. There are several ways to accomplish this. Also note that unary negation should be supported and expression such as, for example, "1--3" should evaluate to 4.
wxWidgets comes with it's own wxStringTokenizer that you may use. You also have the option to make your own tokenizer, but this is not recommended for this assignment.
Simple unary operations (Sin, Cos, Tan) should also be implemented. Pressing Sin and 5 should add "Sin 5" to your textbox, and pressing = should result in the Sine of 5.
Unary operations should still be added as a string to your text box.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!