CEG220: Introduction to C
Programming for Engineers – I
Section 2
Project 1: Triangulation
Program Description:
Frequently, you will come across a time when you need to use triangle rules to triangulate a position. There are three circumstances where we can solve for any side or angle: Side Angle Side (SAS), Angle Side Angle (ASA), and Angle Angle Side (AAS). You must write a program that will ask for each case and solve it. You may assume that all the sides of the triangles are of the same units (feet, meters, kilometers, etc.); all the angles are in degrees.

SAS ASA AAS
Program Requirements:
1) Your program must comply with the class programming standard
2) You must handle SAS, ASA, AAS correctly – taking into account issues of units (ie. you ask for degrees, your program must output degrees even though the trig functions take radians)
3) You must submit a hand-written program specification detailing (1) your approach to solving the problem, (2) the algorithm(s) you used, and (3) justifying the data types you have used
Grading Standard:
This project is worth 50 points. Please note that programs that do not compile or do not link will lose all points related to run-time requirements (examples of run-time requirements includes but is not limited to correct run output, handling certain cases adequately, etc.). Grading standard will be followed strictly:
5 points: run output is included at the end of the program, or in a separate file
20 points: hand-written document (program specification)
60 points: handles all three cases properly (20 points each)
15 points complies with programming standard (5 points each)
·
adequate comments – clear, concise, useful; not
excessive
·
well-named identifiers
·
follows program specification
Due Date:
This project is due on 9/18 in my mailbox by 5 pm. If
your assignment is late – by 5 minutes or 2 days, the penalty is the same (see
syllabus).