1 year ago

BIS 450 DeVry All Week iLabs

Scenario/Summary You

Scenario/Summary You have been asked to add a Body Mass Index (BMI) Calculator to the Healthy Eating website. Body Mass Index is a number that indicates whether an individual is underweight, normal, overweight, or obese, based on the individual’s height and weight. Dr. Dinewell has provided you with the following specifications for the BMI Calculator: • Inputs: Height (inches) and weight (pounds) • Processing Formula: BMI = [ (weight in pounds) / (height in inches) 2 ] • 703 • Outputs: Display BMI value and interpretation of BMI according to the following: o BMI < 18.5:=""> o BMI 18.5 to 24.9: Normal o BMI 25.0 to 29.9: Overweight o BMI >= 30.0: Obese (Source: US Center for Disease Control, You will create an ASP.NET web form to accept the user inputs and display the results. Because Dr. Dinewell eventually wants the BMI calculation feature to be made available through a mobile app as well as through the website, you will create a BMI class to perform the calculations that can be shared between the web form and the mobile app. This will make it so you won’t have to code the calculations twice. Deliverables 1. The following files are added to the Healthy Eating website on the DeVry Web server: • BMI Calculator web form (BmiCalc.aspx) and code-behind file (BmiCalc.aspx.vb) • BMI Class file (App_Code/BMI.vb) 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: • 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 ( 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: