Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this answered by Monday 7/16/2018. It's C# done in Visual Studios. Design the form to contain The form is left up to the

I need this answered by Monday 7/16/2018. It's C# done in Visual Studios.

Design the form to contain

The form is left up to the designer but should accommodate all the requirements listed.

There should be a series of 6 operational buttons, in a grid of 3 by 2. That is 3 across by 2 down.

The top three buttons will be the SHOW buttons.

The bottom three buttons will be the DO buttons.

There is to be a SHOW button and a DO button for each of the three operations you will be performing in this application.

You may choose to put labels over the column of buttons for each operation OR you may choose to use the text on the button to label the buttons, your choice.

One operational set you will be doing is Modulus

One operational set you will be doing is Factorial

One operational set you will be doing is Fibonacci

The clear button

A clear button will need to be placed on the form whose purpose is to clear the message area

The exit button

An exit button will need to be placed on the form whose purpose is to close the application

The text box or textboxes will need to be created for entry of the operands

The Modulus operation requires 2 numbers to perform so there will need to be 2 operands for this operation

The Factorial and Fibonacci operations only require one number for an operand

There is to be the exact number of textboxes visible to the user depending on which operation is being used (refer to the show operations requirements below)

The message area will need to be created to show the user the results of the operation they have requested.

The message area should be under the buttons on the form

The message area should not be editable by the user, a label is best for this purpose

All operational buttons should be of a uniform size and color scheme.

The clear and exit buttons are to be uniform in size in color also but should be a different color scheme than that of the operational buttons

The background color of the form should be a different color than all buttons, any textboxes and labels.

You may choose to leave the background the default but it will still need to be a different color than the buttons, the labels and the textboxes on the form.

The background colors of the textboxes should be unique on the form but the same as each other.

The background color of the message area should be a pastel shade of yellow and the text color in that label should be black and bold faced.

There should be no operational buttons above the text box or below the message area.

You may place the clear and exit buttons anywhere on the form as part of the design where they would fit most logically to provide that good user experience

Operand textboxes should show text in a 14 point font. Use a monospaced font such as Courier New.

The message area should show text in a 12 point font. Use the Times New Roman font for the label.

The font size for the buttons should be no less than 10 and no greater than 12. The font face of the button should be the same as the font face in the textbox.

The title bar of the form should read " Math Functions".

Access key set up

The Clear and Exit buttons are to have access keys set up.

The Show buttons of the operations are not to have Access keys for them

The Do buttons of the operations are to have access keys set up for them

Operation

When the Clear button is clicked, the message area is to be cleared out.

The operand textboxes are not affected or cleared by the use of the clear button.

The application should reflect this in some form to the user so that they know the clear button only clears the message area.

When the Exit button is clicked, the application is to close.When the application closes, a message is to be placed in the message area that thanks the user for using the application and remain visible for a few seconds

Do not use any timer control to achieve the few second delay on the exit, limit the coding of the delay to material covered in section 1 and section 2 of the course.

The Escape Key on the keyboard should be set to exit the program using form properties.

The use of the Escape Key will also trigger the message and timer

If set up correctly, the escape key uses the Exit Button and thus the tie in is automatic

The starting position of the form should be the center of the screen.

The tab order should be the the SHOW button and then the DO button of each of the three operations, then the Clear Button and then the exit button. The operand text boxes and the message area should not have tab stops. No other controls on the form should have tab stops either.

When a SHOW button is clicked for an operation, the user is to be presented with instructions on what they are to enter into the operands and the exact number of operand textboxes as needed.

All three show buttons are to be accessible at all times, they never become inactive.

The DO button associated with a SHOW button will be made available for use, become active, or be usable by the user. Other DO buttons should be turned off, become inactive, disabled, or otherwise unavailable to the user.

When a DO button is clicked, the application will perform the operation indicated by the DO button

A DO button cannot be clicked if the user has not used the SHOW button to set up the number of operand text boxes. The DO button will need to be inactive, disabled or otherwise unavailable to the user until its matching SHOW button has been used.

The DO button will pull the operand or operands from the appropriate textboxes, perform validation checking if needed, perform the operation, and finally display the results in the message area on the form.

The Modulus Operation

The modulus operator (%) used previously returns to the user the remainder of a long division scenario, your Modulus button will do more than just that.

The button is to perform the long division and show to the user the results of the long division problem by displaying the results for both the Whole number answer and the Remainder to the user.

A message back to the user on your Modulus Button is to say something like "11 divided by 2 is 5 with a remainder of 1".

The use of the (/) and the (%) operators is not to utilized for this operation. The use of loops with only the (+) or (-) operators will be utilized to arrive at the answers.

Each individual step in the process of determining the answers do not need to be shown, just the final answers.

The Factorial Operation

Factorial Flow Chart

Factorial is the mathematical operation of multiplying all numbers in sequence from 1 to the number indicated in the factorial.

0 Factorial is defined as having the answer of 1.

Factorial is written with the number followed by the exclamation point.

Example: 4! is 4 Factorial.

4! is equal to 1*2*3*4 with a final answer of 24.

The message to be displayed back to the user is to be similar to this "The answer to 4! is 24".

Because Factorial answers can get quite large quite fast, the maximum number that should be allowed for a factorial computation in this application is 20.

Factorial cannot be calculated on negative numbers.

Messages should be written to the user when input is out of range and tell the user of the appropriate range for factorial in the application.

The use of any prebuilt controls or methods in classes that do factorial is not to utilized for this assignment. The answer must be arrived at by use of code written for the assignment.

Each individual multiplication does not need to be shown, only the final factorial answer.

The Fibonacci Operation

Fibonacci Flow Chart

Fibonacci Series is the mathematical series where finding the value of a term is calculated by adding up the previous 2 terms values.

The 0 term of the Fibonacci Series is defined as having the value of 0

The 1 term of the Fibonacci Series is define as having the value of 1.

These two defined terms prime the series.

Fibonacci Terms are written with the name of the series and the number.

Example: Fibonacci(4) is the representation for the term when given 4 as the number.

Fibonacci(4) is equal Fibonacci(3) + Fibonacci(2) = 2 + 1 = 3.

The message to be displayed back to the user is to be similar to this "Fibonacci(4) = Fibonacci(3) + Fibonacci(2) = 2 + 1 = 3".

The message from Fibonacci(0) and Fibonacci(1) should say "Fibonacci(0) = 0" and "Fibonacci(1) = 1" respectively.

The Fibonacci Series does not grow nearly as fast as the Factorial so put a range upper limit on the Fibonacci Series at 128.

Fibonacci Series terms cannot be calculated on negative numbers.

Messages should be written to the user when input is out of range and tell the user of the appropriate range for the Fibonacci Series in the application.

The use of any prebuilt controls or methods in classes that do Fibonacci Series calculations are not to utilized for this assignment. The answer must be arrived at by use of code written for the assignment.

Each calculation step of the Fibonacci Series does not need to be shown, only the final answers.

The validation of values are to be done in methods.

As both the Factorial and Fibonacci Series have upper range limits, there should be a SINGLE method written that will validate to determine if the number entered by the user is in the range appropriate to the operation.

Only Integer values should be allowed.

The application should check for, catch, and handle when a user enters a Decimal value and attempts any of the operations.

Messages to the user should indicate that decimal values are prohibited

All exceptions will need to be handled. The application should never drop into the debugger or otherwise crash when being tested.

Handle each exception gracefully and display a message on exceptions that can be caught individually such as Format exceptions.

Generic messages are acceptable for the "catch all" category of exceptions.

Handle the empty operand exception differently than if the user entered letters instead of numbers. The messages should be appropriate.

Coding Specifications

ALL control names should be of a meaningful nature. No default names should be left on controls for this program. Remember the concepts of Self Documenting Code when choosing your names of the controls.

No Math class functions that may be out there will be acceptable for this assignment. All algorithms being coded here may be coded using basic operators, decisions, and loops.

Add a comment block into the code just under all the using statements that contains, your name, the class, the trimester and the due date of this lab. You may use single line comments or you can use a delimited comment to put this information into the program.

Remember the use of at least one method is required in the application on the Validation. Other methods can be used.

If multiple exceptions or validation issues occur, all messages should be visible in the message area. Do not overwrite old messages and have only the last message displayed on a series of exception or validation messages.

Special Notes

A reminder, the "+" operator when used with strings concatenates the strings together. Here is an example:

label.Text = label.Text + "Just a string";

This assignment pushes heavily on the understanding of how loops work. Remember to break down the assignment into parts. It may be best to approach on set of operations first like the Modulus operation before trying to code the another operation.

Long division is a series of subtractions. This hint may be helpful.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions