Question: Using C# in visual studio Have the form start up in the center of the screen 12 buttons will need to be placed on the

Using C# in visual studio

Have the form start up in the center of the screen

12 buttons will need to be placed on the form

The placement of the buttons will be left up to you, here you start to design the forms look and feel yourself

Each button will need to be the same size

The buttons should have some regularity or design

Borders should align where appropriate

Do not just throw them on the form randomly

Tab stop setup so that the tabs start at a reasonable spot on the form and progress in a reasonable manner

Integer buttons

byte, short, int, long

There will 4 buttons that represent the 4 integer data types

The buttons should share the same color background

The buttons should have reasonable wording on it to tell the user what the button is

Each button should have a hot key set up for it

Decimal Buttons

float, double, decimal

The will be 3 buttons that represent the 3 decimal data types

The buttons should share the same color background but be different than any other grouping's color

The buttons should have reasonable wording on it to tell the user what the button is

Each button should have a hot key set up for it

Math Ops Buttons

The 3 methods are: Pow, Round and Sqrt

The will be 3 buttons that represent 3 Math class methods

The buttons should share the same color background but be different than any other grouping's color

The buttons should have reasonable wording on it to tell the user what the button is

Each button should have a hot key set up for it

The Clear Button

The Clear and Exit buttons represent a group of 2 buttons and should have their own group background color

Text on the button shall say Clear

A hot key should be set up for the button

The background color of the button should be the same as the background of the Exit button

The Exit Button

The Clear and Exit buttons represent a group of 2 buttons and should have their own group background color

Text on the button shall say Exit

A hot key should be set up for the button

The background color of the button should be the same as the background of the Clear button

In the Center of the form, there will be a single label placed that takes up the remaining bulk of the form

The background color of the label should be a light yellow

The text color of the label should remain black and be bold faced

The text in the label should be centered both horizontally and vertically

The initial state of the text in the label should be "Click a Button"

Experimentation may be needed to get the best design sizing of the control

Make the Font size easy to read for those who may have eye sight issues, a minimum of 18 pt but it may need to be larger

Operations of the Application:

When the user clicks the CLEAR button, blank out the text in the large label only

When the user clicks the EXIT button, the application closes

Tie the Escape Key to the EXIT Button using the form property covered

Each of the remaining buttons will perform a mathematical operation with the data type or using the Math Class method of the buttonFor the integer and decimal buttons, create in the click events 3 variables. A Left Operand, Right Operand and Results variable

The variables should be of the data type of the button. Example, the Byte button variables should be of the byte data type

Create a string from the variables and the operations signs to show the user the math operation done and the result

example: 2 + 3 = 5 or 7 / 2 = 3.5

Put the created string into the large label

Each of the 5 math operations (+, -, *, /, %) will be used at least 1 time between the 7 buttons. The division (/) and the modulus (%) must be used on both integer and decimal data types. Set each button to the math operation listed here:

Byte Button should do the Addition (+) operation

Short Button should do the Subtraction (-) operation

Int Button should the Integer Division Operation (/). Answers should only be integers.

Long Button should the Modulus Operation (%)

Float Button should do the Modulus Operation (%)

Double Button Should do the Decimal Division Operation (/). Answers should be in form with digits past the decimal point.

Decimal Button should do the Multiplication Operation (*)

Further Note on the Float, Double and Decimal buttons, format the output to show the number of digits of precision that date type offers. For example, the Float has 7 digits of precision so make sure to show the many digits past the decimal point in your output. You may have to work on the math too to get it to come out for you that way. Do the same for Double and Decimal.

Use the string formatting commands to should significant digits when needed

For the Three Math Class buttons (Pow, Round, Sqrt), perform the method operation on an integer variable, creating a message to the user with the results detailing what the button did.

For Example: The square root of 4 is 2.

Use variables as needed for these buttons

Use the large label to display the message to the user

Coding Specifications for the Application:

You have been given the form name itself, you are to name the buttons and the label with appropriate Self Documenting Names using the first three letters to describe the control, the remain part of the name to describe what the control does

example, frm is used for a Form

be consistent throughout the program on your naming of controls

Use a space or an empty string to set a text property to empty

example: textbox1.Text = "";

Remember, a label text property can be set just like a textbox property

Put a multiple line comment (/* */) at the top of the code, just under all those using statements, that contains your name, the class information, and due date of the exercise on separate lines

Use single line comments (//) in all buttons to document what the code is doing

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 Databases Questions!