10 months ago

BIS 450 DeVry All Week iLabs

(See Syllabus/”Due

(See Syllabus/”Due Dates for Assignments & Exams” for due dates.) i L A B O V E R V I E W Scenario/Summary You have been asked to add a Daily Calorie Needs Calculator to the Healthy Eating website. This feature will determine how many calories an individual needs to consume daily to maintain his or her current body weight. If the person consumes fewer calories, he or she will lose weight; if more calories are consumed, the person will gain weight. Dr. Dinewell has provided you with the following specifications for the Daily Calorie Needs Calculator: • Inputs: Gender, weight (pounds), height (inches), age (years), activity level • Processing: o Basal Metabolic Rate (women) = 655 + (4.35*weight) + (4.7*height) – (4.7*age) o Basal Metabolic Rate (men) = 66 + (6.23 * weight) + (12.7*height) – (6.8*age) o Daily calorie needs = BMR * (activity factor) o Activity factor = 1.2 if sedentary, 1.375 if lightly active, 1.55 if moderately active, 1.725 if very active, 1.9 if extra active • Source: • Outputs: Daily calories needed to maintain current weight You will create an ASP.NET Web form to accept the user inputs and display the results. Because this is a more complex calculation involving more inputs than last week’s BMI Calculator, you will need to use several different types of server controls including radio buttons and a drop-down list for this task. You will also add input validation to ensure that the form will not malfunction or give erroneous results if some input values are missing or entered incorrectly. Deliverables 1. Calorie Needs Calculator Web form (CalNeeds.aspx) and associated code-behind file (CalNeeds.aspx.vb) added to the Healthy Eating website on the DeVry Web server. 2. Word document with three screenshots of Calorie Needs Calculator Web form displayed in browser (Your Name BIS450 Lab3 Screenshot.docx). Screen shots must show calculator test inputs and results or appropriate error messages. Screenshots must show the complete browser window, including the URL of the page. Grading Rubric Criteria Points % Step 2: Create Calorie Needs Web Form (CalNeeds.aspx) • CalNeeds.aspx created in your Web folder • Has standard page header, navigation menu, and page footer • Form title “Calorie Needs Calculator” in bold • Input controls: radio buttons for male and female; textboxes for height, weight and age; drop-down list for activity level • Button for BMI calculation • Literal control below button for display of results 10 40% Step 3: Add Calculate BMI Event Handler in Code-Behind File (CalNeeds.aspx.vb) • Click event handler created for Calculate Calorie Needs button in code-behind file • Statement added to Else clause to calculate BMR for men using correct formula • Captures input values, calculates BMR, multiplies BMR by activity to calculate calories needed • Displays calories needed 6 24% Step 4: Add Input Validation (CalNeeds.aspx)

• RequiredFieldValidators added for height, weight, and age • RangeValidator added to check height is 48-84 type Double • RangeValidator added to check weight is 50-500 type Double • RangeValidator added to check age is 18-120 type Integer • Appropriate error messages displayed by all validators 6 24% Step 5: Test, Capture Screen Shots, and Submit (Student Name BIS450 Lab3 Screenshot.docx) • Word file submitted to Dropbox with screen shots of: o Calculator with correct inputs (calories should be 2173) o Calculator with all fields blank (should display all required field error messages) o Calculator with invalid inputs (should display all range error messages) 3 12% Total 25 100% PREPARATION 1. Download the file BIS450 Lab3 Code Snippets.txt from Doc Sharing and save it in your working folder for this lab. 2. Using the Citrix remote lab: a. Follow the login instructions located in the iLab tab in Course Home. b. Upload the file 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 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, (for example, jsmith for student John Smith). • Passive Mode and Anonymous Login: 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 Calorie Needs Web Form 1. Add a new Web form named CalNeeds.aspx to the site. (Review last week’s iLab if you need help remembering exactly how to do this.) 2. Set the Title property of the Document to Calorie Needs Calculator. 3. Attach StyleSheet.css to the Web form. 4. As you did when setting up the BMI Calculator Web form in last week’s iLab, open Default.htm and copy the contents of its element (in HTML, everything in between the and tags, but not the and tags themselves). Paste these contents inside the div in CalNeeds.aspx (in HTML, in between the and