Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
PF_13_14_T1_Project1_030713

# PF_13_14_T1_Project1_030713

Ratings: (0)|Views: 212|Likes:
C++ Assignment.
C++ Assignment.

Published by: 120shal on Jul 16, 2013

### Availability:

Read on Scribd mobile: iPhone, iPad and Android.
See More
See less

09/25/2013

pdf

text

original

TCP1101 Programming Fundamentals Project#01
Programming Fundamentals
Faculty of Computing & InformaticsMultimedia University
Help! Prof. Taylor!
1. Introduction
You may have learned how to estimate the trigonometric functions such as sine, cosine andtangent of an angle in school by drawing lines on paper and plotting out a triangle etc. Howdo the computers and your calculators compute such values when there are no little guys with pencils and rulers inside them?Very often, in most programming languages such as C++, such functions already provided for you in the built-in libraries to compute such values. However, how were those librariesimplemented in the first place? What do you do if you do not have such libraries?To answer that, we need helps from Prof. Taylor because Prof. Taylor has invented what wenow called Taylor Series to compute such values.The purpose of this Project#01 is for you to implement those trigonometric functions usingthe given Taylor Series. See details below.
This Project#01 must be submitted by
31 July, 2013
3. Deliverables
The objective of this project is to test the skill of the students in problem solving and modular design using flowcharts and implementing them in the C++ programming language. Thestudents are to design using flowcharts a program that will ask the user for a value of an angleand then display the sine, cosine and tangent of that angle. The users have a choice to enter the angle in degree or in radian. After the users have tried out a value, he/she can choose to trymany other values until he/she chooses to stop using the program.Sample sessions of an actual such program are being provided in Figure 1(a) and Figure 1(b)for your reference. Take note that the program generates everything on the display except for those parts that required users response (after the “=>” symbol) are to be typed by the users.Take note that this is only the minimal requirement; you should add as much features as possible to your program and to make it as user-friendly as possible in order to get better marks.You may want to also compute other functions using Taylor series.The program basically asks the users for an angle value and calculates the sine, cosine andtangent of the angle. The users have a choice to enter the angle either in degree or in radian. If the user enters it in degree, it will be converted into radian before the required values arecomputed.

TCP1101 Programming Fundamentals Project#01
Given an angle value x in radian, the equations to compute sine, cosine and tangent are given by the Taylor Series as below:
...!9!7!5!3 )sin(
9753
++=
x x x x  x x
...!8!6!4!2 1)cos(
8642
++=
x x x x  x
)cos()sin()tan(
x x x
=

TCP1101 Programming Fundamentals Project#01
Figure 1 (a) : Sample Session1Figure 1 (b) : Sample Session 2