2. Word document with screenshot of BMI Calculator web form displayed in browser (Your Name BIS450 Lab2 Screenshot.docx). Screenshot must show calculator test inputs and results. Screenshot must show the complete browser window, including the URL of the page. Grading Rubric Criteria Points % Step 2: Create Shared BMI Class for Calculations (App_Code/BMI.vb). • Class file for BMI class created in App_Code folder • Class file contains method Calculate() • Class file contains method Interpret() 6 24% Step 3: Create BMI Calculator Web Form (BmiCalc.aspx). • BmiCalc.aspx created in your Web folder • Has standard page header, navigation menu, and page footer • Form title “Body Mass Index (BMI) Calculator” in bold • Input textboxes for height and weight • Button for BMI calculation • Literal control below Button for display of results 10 40% Step 4: Add Calculate BMI Event Handler in Code-Behind File (BmiCalc.aspx.vb). • Click event handler created for Calculate BMI button in code-behind file • Calls BMI.Calculate() method to calculate BMI • Calls BMI.Interpret() method to interpret BMI • Displays BMI value and interpretation 6 24% Step 6: Test, Capture ScreenShot, and Submit (Student Name BIS450 Lab2 Screenshot.docx). • Word document with screenshot of calculator showing correct test results in browser submitted to Week 2 iLab Dropbox 3 12% Total 25 100% i L A B S T E P S Preparation 1. Download the file BIS450 Lab2 Code Snippets.txt from the iLab Files folder in Doc Sharing and save it in your working folder for this iLab. 2. Using the Citrix remote lab: a. Follow the log-in instructions located in the iLab tab in Course Home. b. Upload the file that you downloaded from Doc Sharing into your BIS450Labs folder on your Citrix drive. (You created this folder in Week 1). STEP 1: Open Website on the DeVry Web Server. 1. Launch Microsoft Visual Studio 2010. You must use Visual Studio 2010 in the Citrix environment. 2. Pull down the File menu and select Open, then select Web Site. In the Open Web Site dialog, select FTP Site in the left column. The connection information that you used in the previous lab should be displayed: • Server: bisweb.devry.edu
• Port: 21 • Directory: coursefolder/yourname, where coursefolder = folder on the Web server for your course (provided by your professor), and yourname = your first initial and last name, (e.g. jsmith for student, John Smith). • Passive Mode and Anonymous Log-in: Both unchecked. • Username: acadDnnnnnnnn, where Dnnnnnnnn = your DSI number. • Password: Enter the same password as you use for Citrix iLab (must be re-entered each time). Click Open. STEP 2: Create Shared BMI Class for Calculations 1. In the Solution Explorer window, click on the website root (ftp://bisweb.devry.edu/coursefolder/yourname) to select it; then pull down the website menu and click New Folder. Enter App_Code as the name of the new folder. (App_Code is a special folder name where shared code must be stored on an ASP.NET website). 2. With the App_Code folder selected in Solution Explorer, pull down the website menu and select Add New Item, or click the Add New Item button on the toolbar. In the Add New Item dialog, select the Class template. Change the Name to BMI.vb. Check that under Installed Templates at the upper left, Visual Basic is selected. Click Add. 3. The BMI.vb class file should be created in the App_Code folder and opened for editing. Make sure that BMI.vb appears under App_Code in the Solution Explorer window. 4. Open the file BIS450 Lab2 Code Snippets.txt that you downloaded from Doc Sharing. Select and copy the code for the Calculate() and Interpret() functions and paste it into the editing window in between the Public Class BMI and End Class statements. (Notice that the code for the Interpret() function is incomplete). After pasting, your BMI.vb should look like this: 5. Based on the specifications provided by Dr. Dinewell and the CDC (listed in the scenario at the top of these lab instructions), write the additional statements that are needed in between the Select Case BmiValue and End Select statements to complete the Interpret() function, so that this function will return a string containing a correct interpretation for any BMI value. Use the statements for the one case provided in the function as a model. TIP: Case clauses are evaluated in order from top to bottom, and only the first one for which the Case condition is satisfied is performed. Also, remember that you can use a Case Else as the last Case clause, which will be performed if none of the other Case conditions are met. 6. Click the Save button on the toolbar to save your work so far. STEP 3: Create BMI Calculator Web Form. 1. In the Solution Explorer window, click on the website root (ftp://bisweb.devry.edu/coursefolder/yourname) to select it; then pull down the website menu and click Add New Item, or click the Add New Item button on the toolbar. In the Add New Item dialog, select the Web Form template. Change the Name to BmiCalc.aspx. Make sure that under Installed Templates at the upper left, Visual Basic is selected, and that the checkbox for Place code in separate file is checked. Click Add. 2. The BmiCalc.aspx web form and its associated code-behind file should be added to the website, and should be visible in Solution Explorer. The code-behind BmiCalc.aspx.vb is shown as “underneath” the web form file BmiCalc.aspx; click the + sign beside BmiCalc.aspx to see it. The web form is opened in the editing window in Source View. 3a. In the BIS450 Lab2 Code Snippets.txt file that you downloaded from Doc Sharing, copy the line and paste it into line 2 of BmiCalc.aspx, immediately below the directive. After you have pasted in this directive, the page should look like this: TIP: This “@ Assembly” directive is needed on our Weblab server to ensure that ASP.NET can find the shared class file for the BMI class. Most commercial Web sites are configured so that files in the App_Code folder are shared automatically, so this statement would not be necessary 3b. Click the Design tab below the editing window to switch to Design View. 4. In the Properties window, select Document from the dropdown list at the top. For the Title property, enter BMI Calculator.