Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need this answered by July 30, 2018. This is C# done in Visual Studios. Design the form to contain The form is left up

I need this answered by July 30, 2018. This is 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.

The user will need to type into application the amount of money they wish to have broken down into the denominations.

This will need an appropriate label on the form to inform the user of what is to be entered

This user entry piece should be centered near the top of the form

The Dispense button

The user will click this button to start the dispensing process.

The button should be directly below the area when the user enters the amount to be dispensed

The clear button

A clear button will need to be placed on the form whose purpose is to clear the entrance of the money area and all the dispensed amounts

All check boxes will be reset to the checked position

The exit button

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

The esc key on the keyboard needs to be tied to this button

There will need to be labels used to display the amount of each denomination that can be dispensed.

There will need to be text saying the denomination

There needs to be an area where the number is displayed of the denomination

The denominations that must be handled include: $100, $50, $20, $10, $5, $1.

There will not be the need to dispense out coinage, just bills.

There should be a place to display a message to the user when the last dispensing of money is made.

A label should be used for this and be placed above the dispensed amounts area.

Use a Group Box to surround and set the denominations area off from the rest of the form. This is a use of a group box for more a UI design than a grouping of radio buttons.

The display of time should be in this groupbox also

Each denomination, except the $1, needs to have a check box next to it to turn it on or off.

If the denomination is to be dispensed, the checkbox will be checked

If the denomination is not to be dispensed, the check box will not be checked

All denominations should be set to be dispensed when the application starts

The $1 is the default and can never be turned off

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

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 textbox should be white.

The background color of the denomination labels when the actual values go into should be pale yellow.

There should be no buttons above the text box or below the dispensed amounts area.

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 " Fun Cash Machine".

Access key set up

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

The Dispense button is to have an access key set up

Operation

When the Clear button is clicked, the form resets to the default status.

Amounts dispensed go away and get cleared out

The amount to dispense is reset to no value

All check boxes are to be reset to the checked position so that all denominations are set to dispense when the button is clicked

When the Exit button is clicked, the application is to close.

A message box is to display that tells the user how many dispensing actions they did

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 by using the exit button. Only code it in the exit button event.

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 textbox when the user enters the amount, then the Dispense button, then the Clear Button, and then lastly the Exit button. No other controls on the form should have tab stops either.

When the dispense button is checked, the value will be validated and then dispensed.

Only dispense bills that have been checked to be dispensed, skip bills that have not been checked.

Validation occurs before trying to dispense anything.

You should clear out all dispense values when the dispensed button is pressed once you verify you have a valid number to dispense. After that clear of those labels, then proceed dispensing the bills. The user might have turned off some of the denominations between dispense actions. Those values still need to be cleared.

What is dispensing? Consider the value of $100. If we were to dispense all denominations then we would get 1 $100 bill. If we were to dispense with only the $10 denomination checked, the value would be 10 $10 bills.

The time when the last dispensing happened should be updated after the process of dispensing is complete, whether or not there was an error or not.

The validation of value is to be done when the dispense button is clicked.

There is only the one textbox that will have to be validated so the validation will be minimal.

As there is not a message area on the form for this assignment, you are to use a message box to display the error message.

Only Integer values should be allowed.

The application should check for, catch, and handle when a user enters a Decimal value

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.

The algorithm to break the dispensed amount down to the individual denominations is to be coded into a method called by the dispense button click event.You may find it easier to write a method called by your dispense method that breaks down a value based on the denomination such as:

HowManyOfTheBillIsInThisNumber( Number, BillSize)

Then called it multiple times, changing the bill size based on the denomination

By separating the actions out like this, you layer the application and could pull code out for future use easier.

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.

Validation should be done in methods.Use a Stacked style of validation. This means that a single validate method is called to validate but within that method, other smaller methods are called to validate on a specific criteria

For example, the validation of having something in the textbox is one criteria and should be a single method that tests just that criteria. This single method is called by the Overall Validation method.

The Overall Validation method is called by the click event for the dispense button.

Single criteria you should be on the watch for include: Having something in the textbox to dispense, having a valid number (integer) in the text box, having a positive number in the text box, making sure not to have letters in the text box.

If multiple exceptions or validation issues occur, all messages should be visible in a message to the user in the message box.

This one coding specification will probably the one you overlook the most so double read this one.

Only interact with the controls on the form inside the click events. Methods you create for dispensing and validation should all receive parameters and return values. The only place that a textbox text property or a label text property should be touched is in a click event on buttons. This promotes re-usability of code.

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 this by attacking a single denomination first and dispensing it and then add in denominations and then finally checking the on/off of the denominations.

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

=+1. What are the organization's reputation goals on this issue?

Answered: 1 week ago

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago