Question: start up Visual Studio and create a new ASP.NET Empty Web Site named yourFirstName_LastName_lab1 Add a new Web Form item to the page named Default.aspx

start up Visual Studio and create a new ASP.NET

Empty

Web Site named yourFirstName_LastName_lab1

Add a new Web Form item to the page named Default.aspx

Convert div tag in form to section tag

Develop a user-interface prototype

Default Values - Set the following values declaratively in your ASP.NET code

Default loan amount is the empty string

Default interest rate is 7%

Default time period is 20 years. Provide time periods of 10, 15, and 20 years in the drop-down box

Provide Access Keys for the Web controls Note: Access keys are illustrated with an underline in the UI prototype shown at the right. You do notneed to style your text to indicate the access keys.

ACCESS+C for the Calculate Interest button

ACCESS+R for the Reset Button

Other access keys are indicated with underlines

Step 2

Write Button Click Event Handler Methods

Write an event handler for the Calculate Interest button to calculate the simple interest accrued based on the following formula:

 calculatedInterest = loanAmount * interestRate * numberOfYears; 

Display the calculated interest in an asp:Label underneath the fieldset and formatted as follows:

Test case 1: Loan amount is 100 at 7% interest for 20 years.

 Total interest for a loan of $100.00 at 7% interest for 20 years is $140.00 

Test case 2: Loan amount is 12.11 at 5% interest for 10 years.

 Total interest for a loan of $12.11 at 5% interest for 10 years is $6.06 

Tips

The Convert class methods can be used convert legal strings to numeric values. For example:

double loanAmount = Convert.ToDouble(LoanAmountTextBox.Text);

The String.Format method using format strings is the easiest way to produce the output. See String Formatting in C# for an explanation of the formatting specifiers.

String output = String.Format("Total interest for a loan of {0:C} at {1:0%} interest for {2} years is {3:c}", loanAmount, interestRate, numberOfYears, interest);

Implement the event handler for the Reset button to set all controls back to their default values and clear the calculated interest output (if any).

Verify that your ACCESS+R access key works to invoke the Reset button.

Conduct User Acceptance Testing

Acceptance testing is done by the user or client to verify that software meets customer's needs (as opposed to software that is bug-free but does not accomplish what the user needs done). User interface prototypes are an important intermediate step in acceptance testing.

User-interface prototypes (both paper and software) are developed to show to the client and get their acceptance early in the development process before spending much time writing code to implement functionality. Mistakes found early are much cheaper to fix than mistakes found later in development.

Typically an acceptance checklist will be prepared in advance to guide the user through a series of tests.

User Interface Acceptance Testing

Default values are correct (empty loan amount, 7%, 20 years)

Loan Amount accepts all user input

Interest Rate accepts mutually exclusive selections of 5%, 6%, or 7%

Number of years allows selection of 10, 15, or 20 years

All fields are accessible through access keys

Tab sequence through fields is in logical order

Labels associated with corresponding control

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!