Question: #8925

HOMEWORK # 3 Complete Solution

HOMEWORK # 3

In this HW are will be adding extra GUI controls and functionality to HW # 2. First, your calculator should be fully functional. This means that it should be able to accomplish all arithmetic operations on any set of numbers. The number buttons should be fully active and implemented. The user cannot edit the display what so ever and the cursor should not be displayed (google how to do this OR use a Label instead of a TextBox) If the input is 3 then + then 5 then = and then + then 4. Your calculator should display 12.

This means your calculator should be able to append other operations and operands on results. Next, your calculator should be able to convert between binary and decimal. You are only required to do conversation and not binary arithmetic. In order to do this your will need to add two radio buttons to your form that give the user the option to pick if he/ she want to be in Decimal (default - startup) or binary mode.

This is an example of how your controls should / may look like The binary mode is used solely to convert a number from Decimal to Binary and visaversa. Example: if the user enters the number 10 in decimal mode and then selects the binary mode then 1010 should be displayed. If the user enters 101 while in binary mode and then selects the decimal mode then the number 5 should be displayed. Make sure you disable all non-necessary control elements when in binary mode. You need to write a method for converting binary into decimal and another method to convert from decimal to binary. (do not use built in method /API) Hereis an example I found on the web to convert from decimal to binary http://www.wikihow.com/Convert-from-Decimal-to-Binary

Hereis an example for converting from binary to decimalhttp://www.wikihow.com/Convert-from-Binary-to-Decimal

 

Finally. Your calculator should respond to keyboard key press (just like the calculator for windows). So if someone presses the number 1 on the keyboard; this will mean that the button with number 1 has been clicked and the display will show the number 1. If the * sign is pressed on the keyboard; it should act as if the * button is clicked and if the enter button is pressed on the keyboard then it acts just like if the “=” is clicked. Hereis a link from MSDN that provides with the means on how to do this. Read it carefully. http://msdn.microsoft.com/en-us/library/ms171538.aspx

Solution: #8953

HOMEWORK # 3 Complete Solution

This Tutorial is rated A+ p...
Tutormaster
Rating: A+ Purchased: 11 x Posted By: Vikas
Comments
Posted by: Vikas

Online Users