hw3 - Homework 3 CIS 252 (Spring 2011) — Introduction to...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework 3 CIS 252 (Spring 2011) — Introduction to Computer Science Coverage This assignment covers material through Chapter 3 of Haskell: The Craft of Functional Programming . It also emphasizes use of the design recipe discussed in class. Logistics This homework is officially due in class by Thursday, February 10 . However, it comes with an automatic extension: anything submitted by 1pm on Friday, February 11 will be accepted as being on time. You may work singly or in pairs on this assignment. Background In this homework you will develop a series of little programs about lines in the plane. We start with reviewing some high school math. If necessary, check out http: //mathforum.org/dr.math/faq/formulas/faq.ag2.html#twolines for a bit more background than covered here. Also, follow Polya’s advice and draw pictures as you are reading this. Lines and their equations. Each line in the x- y-plane is given by an equation of the form: a · x + b · y + c = , where a , b , and c are real numbers and at least one of a and b are nonzero. Some examples: 1. The vertical line passing through the point ( 1 , ) is given by: x- 1 = (that is, a = 1, b = 0, and c =- 1). 2. The horizontal line passing through the point ( ,- 6 ) is given by: y + 6 = (that is, a = 0, b = 1, and c = 6). 3. The line with slope 2.5 that passes through the point ( 1 , ) is given by: 5 · x- 2 · y- 5 = 0 (that is, a = 5, b =- 2, and c =- 5). Note that any line is given by many equations. For example, the line of example 3 is also given by: 10 · x- 4 · y- 10 = ,- 2 . 5 · x + y + 2 . 5 = , x- . 4 · y- 1 = , ... Degenerate lines. An equation of the form 0 · x + · y + c = 0 (that is, an equa- tion with a = b = 0) is called degenerate . (When c = 0, then every point satisfies the equation. When c 6 = 0, no point satisfies the equation.) By convention, we0, no point satisfies the equation....
View Full Document

This note was uploaded on 02/19/2011 for the course CIS 325 taught by Professor Worden during the Spring '11 term at Syracuse.

Page1 / 3

hw3 - Homework 3 CIS 252 (Spring 2011) — Introduction to...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online