Lab 1. Purpose. Assignment. Action Items/Programming Requirements

Similar documents
Lab 2 Population. Purpose. Assignment Lab 2 analyzes population growth of a town as well as compare the population growth of two towns.

Lab 1 Concert Ticket Calculator

Lab 3 - Pizza. Purpose. Assignment

ITEC136 - Lab 2 Population

Geometry- Unit 6 Notes. Simplifying Radicals

Study Guide and Review

Summer Math Packet for Rising 8 th Grade Students

SUGGESTED LEARNING STRATEGIES:

Classify Triangles. by the Angle Measure &The Side Lengths. Properties a SCALENE Triangle angles 1.Sum of the interior

(13) Page #1 8, 12, 13, 15, 16, Even, 29 32, 39 44

8. prove that triangle is a scalene triangle, right triangle, and/or an isosceles triangle. (evaluation)

c122mar413.notebook March 06, 2013


Name. 6b, Triangles. 1. A bridge contains beams that form triangles, as shown below.

1. Identify the different parts of a triangle 2. Classify triangles by their angle measures 3. Classify triangles by their side lengths

Discovery Activity & Practice

Programming language components

Arithmetic. Edexcel Primary curriculum. Mathematics Grade 6. S.no Topics Levels

Mathematics Curriculum Medium Term Planning Year Five

Summer Review for incoming Geometry students (all levels)

Course Outlines. Elementary Mathematics (Grades K-5) Kids and Numbers (Recommended for K-1 students)

GEOMETRY Chapter 4 Lesson Plan: Triangle Congruence

Defns An angle is in standard position if its vertex is at the origin and its initial side is on the -axis.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Lines Plane A flat surface that has no thickness and extends forever.

Please be sure to save a copy of this activity to your computer!

TImath.com. Geometry. Triangle Inequalities

Learning Objective Key milestone indicator(s) Introduction Independence Application/Mastery

ITSE 1411 Beg. Web Programming

CSCI 3300 Assignment 7

CMPT 100 : INTRODUCTION TO

CSCI 3300 Assignment 7

Arrays Structured data Arrays What is an array?

Lesson 1.9.1: Proving the Interior Angle Sum Theorem Warm-Up 1.9.1

8 th Grade Math Reference Sheet

GRADE 6 PAT REVIEW. Math Vocabulary NAME:

SECTION SIX Teaching/ Learning Geometry. General Overview

Name Date Teacher Practice A

Activity 1 Look at the pattern on the number line and find the missing numbers. Model. (b) (c) (a) (b) (c) (d)

This table connects the content provided by Education Perfect to the NSW Syllabus..

Type of Triangle Definition Drawing. Name the triangles below, and list the # of congruent sides and angles:

Chapter 9: Surface Area and Volume CHAPTER 9: ANGLES AND PYTHAGOREAN THEOREM. Date: Lesson: Learning Log Title:

4.1 TRIANGLES AND ANGLES

Level 1 - Maths Targets TARGETS. With support, I can show my work using objects or pictures 12. I can order numbers to 10 3

8.4 Special Right Triangles

Classifying Triangles

Manju Muralidharan Priya. CS4PM Web Aesthetics and Development WEEK 11

INFORMATION FOR PARENTS AND CARERS TARGETS IN MATHEMATICS

Foundation. Scheme of Work. Year 9. September 2016 to July 2017

Section 1: Decimal Numbers

Geometry ~ Unit 2. Lines, Angles, and Triangles *CISD Safety Net Standards: G.6D

ACT Math and Science - Problem Drill 11: Plane Geometry

Polygons - Part 1. Triangles

6 th Grade Math Reference Sheet

MATH GRADE 6. Assessment Anchors & Eligible Content. Pennsylvania Department of Education 2007

High School Geometry

Year 4 Step 1 Step 2 Step 3 End of Year Expectations Using and Applying I can solve number and practical problems using all of my number skills.

Grade 7/8 Math Circles Fall Nov.4/5 The Pythagorean Theorem

ST MARY S COLLEGE FORM ONE COURSE OUTLINE MATHEMATICS. Term 1. Addition and subtraction. Multiplication and division facts

Topic A- F th Grade Math Unit 1 Dates: Aug 1st- Aug 25 th

5th Grade Pacing Guide/Expressions Stanwood Camano School District

Smarter Balanced Vocabulary (from the SBAC test/item specifications)

Georgia Performance Standards for Fourth Grade

Chapter 6.1 Medians. Geometry

ELGIN ACADEMY Mathematics Department Evaluation Booklet (Core) Name Reg

Christ Church, Church of England (VC) Primary School. Aspire, celebrate and learn in an inclusive community. A parent s guide to Year 5 Maths

HPISD Curriculum: Grade 4 TAG Math

Geometry - Concepts 9-12 Congruent Triangles and Special Segments

Math: Grade 6 Unit: Data About Us: Statistics Suggested Length: 5-6 weeks

Geometry End of Course Review

Task 1. Set up Coursework/Examination Weights

Name Date Time. Measure each angle below with a protractor. Then choose a word from the list to name each angle type: acute, obtuse, adjacent, right.

Unit 3 Geometry. Chapter 7 Geometric Relationships Chapter 8 Measurement Relationships Chapter 9 Optimizing Measurements MPM1D

Topic Week Elementary 2 Round numbers and measures to an

Closed shapes with straight sides

Choose the correct answer. For 1 3, use the diagram. Which triangle is right and isosceles? Which angle is an acute angle? J L K

The National Strategies Secondary Mathematics exemplification: Y8, 9

CSCI 3300 Assignment 3

UNIT 4 MODULE 2: Geometry and Trigonometry

VOCABULARY. Chapters 1, 2, 3, 4, 5, 9, and 8. WORD IMAGE DEFINITION An angle with measure between 0 and A triangle with three acute angles.

Math Lesson Plan 6th Grade Curriculum Total Activities: 302

Mathematics LV 4 (with QuickTables)

West Windsor-Plainsboro Regional School District Basic Geometry Grades 9-12

introjs.notebook March 02, 2014

NESHAMINY SCHOOL DISTRICT LANGHORNE, PA CURRICULUM MAP

Moore Catholic High School Math Department

GRADE 5. Operations & Algebraic Thinking - Domain

Moore Catholic High School Math Department

6th Grade Math Learning Targets. Grade 6 Algebra

You MUST know the big 3 formulas!

G.8 Right Triangles STUDY GUIDE

Key Milestone Indicator(s) Basic Advancing Deep. With help or structure, there is counting forwards to and across 100, beginning with 0 or 1.

JAVASCRIPT BASICS. Type-Conversion in JavaScript. Type conversion or typecasting is one of the very important concept in

9. 4 points: What is the area of the triangle with vertices whose coordinates are (3,7), ( 4,25), and (3,11)?

Objective 1 : The student will demonstrate an understanding of numbers, operations, and quantitative reasoning.

Geometry. Oklahoma Math Day INSTRUCTIONS:

Introduction to Geometry

c) Are the triangles isosceles, scalene, or equilateral triangles?

Prime Time (Factors and Multiples)

Vocabulary for Geometry. Line (linea) a straight collection of points extending in opposite directions without end.

Transcription:

Lab 1 Purpose To assess your ability to apply the knowledge and skills developed in weeks 1 through 4. Emphasis will be placed on the following learning outcomes: 1. Create and display simple syntactically correct HTML documents. 2. Describe the execution a JavaScript program in a web browser. 3. Write and call functions that utilize parameters and return values. 4. Declare, define, and use variables in a script. 5. Correctly use the JavaScript conditional "if" statement. Assignment Your local school district wants a web page to analyze triangles based on the lengths of the three sides. You have been selected to create the HTML and JavaScript files needed to implement this analyzer. This application is to determine two things about each triangle once it determines that the inputs can form a triangle: Categorize by the number of sides with equal lengths o Equilateral triangle (all 3 sides are the same length) o Isosceles triangle (two sides are of the same length, the third is of a different length) o Scalene triangle (all 3 sides are of differing lengths) Categorize by largest angle o Right triangle (triangle contains a 90 degree angle) o Obtuse triangle (triangle contains an angle > 90 degrees) o Acute triangle (triangle only contains angles < 90 degrees) Categorizing by largest angle only using the lengths of the sides can be accomplished as follows: Determine which of the three sides is the longest. We will call this s1 The other two sides we will call s2 and s3 Calculate the squares of each of the three sides. We will call these s1sq, s2sq and s3sq Compare s1sq to the sum of s2sq and s3sq If they equal then the triangle is a right triangle o This is the Pythagorean theorem If s1sq is bigger than the sum then it is an obtuse triangle Otherwise it is an acute triangle The first step is verifying that the inputs can form triangle. If the sum of the lengths of the two shorter sides is less than the longest side s length then those three sides cannot construct a triangle. Action Items/Programming Requirements

The solution must use and deliver both an HTML and a JS file. The JS file must be referenced in the <head> tag of the HTML document using the <script> tag to load your function so it can be called later on. The solution should use a <script> in the <body> of the HTML to prompt the user for the necessary input information, then call the function passing the input information as parameters. The input information is: o The length of the 1 st side of a triangle o The length of the 2 nd side of a triangle o The length of the 3 rd side of a triangle The prompt() function must be used to all gather information from the user just as was done in the example screen shots. Do not use <input> tags. The function shall calculate the answers, build and output additional HTML with analysis information. Function Requirements You must use a function as described below o Function must have three parameters, representing the lengths of the three sides of a triangle. o The function must be in the JS file. o Do not prompt for user input within the analysis function, input values must be passed as function parameters. o The function parameters must be used for all analysis in the function. No global variables allowed. Put the HTML and JS files in the same folder. Try to make your solution look similar to the screen shots. Put identifying information in your files: your name, assignment name/number term/class. Example for HTML: <!-- YourName Lab 1 2015-Wi-ITEC136 --> Example for JS: /** * @author YourName * Lab 1-2015-WI-ITEC 136 */ Review code against the documentation and style requirements Word document available on the course web site for the assignment. You will find that both documentation and style requirements are facilitated by the Aptana Integrated Development Environment (IDE). Screenshots (FireFox): Prompting the sides of a triangle:

Displaying results for can t form a triangle :

Displaying results for an analysis: Helpful Hints The following hints may help you to solve the problem: Use the prompt() function to input data. For example: var favcolor = prompt("what is your favorite color?", "yellow ); The first parameter is shown to the user and the second parameter is the optional default response. Recall that prompt() returns a string value. Use the parsefloat() function to convert a string into a floating point number. After the JavaScript below, receipttotal will hold a floating point value with decimal precision, ready to be used in math operations. var numberasstring = "6.023"; var receipttotal = parsefloat(numberasstring); Use the parseint() function to convert a string into an integer number. After the JavaScript below, totalpeople will hold a whole number value of 123, ready to be used in math operations. var totalpeopleasstring = "123"; var totalpeople = parseint(totalpeopleasstring); Use the tofixed() method of any Number object (variable) to convert a number into a string with a fixed number of decimal places. For example: var mypi = 3.1415926535;

document.writeln(mypi.tofixed(4)); // writes out 3.1416 Use Math.round() to round a number to the nearest integer var wholenum = Math.round(20.49); // Returns 20 Grading Criteria Quality of the solution: 0 50 points o Documentation (internal comments) (0 5 points) It is not uncommon for industry to impose a way of documenting software that is uniform across all programmers. Documentation standards are outlined in the same document referenced in the style bullet below. o Style (formatting, naming conventions and appearance of solution code) (0 5 points) As listed in the action items of the course web page lab assignment, ensure that your solution code meets the documentation and style guidelines for this course. The documentation and style requirements Word document titled "DocumentationAndStyleGuidelines.doc exists in the Resources folder on your course CD and as a link on the lab assignment page web page. Review your code against this document. I am looking for consistency also. For example, if you prefer to put your curly braces on the same line as the if statement rather than the next line, that is fine provided you are consistent throughout your code. o Correctness (how the program works under test) (0 40 points) The program should work, and be seen to work. The code should be robust. Note that grammar, spelling, and writing mechanics do not contribute to the total points for this assignment; however, improper grammar, poor spelling, or poor writing mechanics may result in significant point deductions.