This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ENGR 141 Spring 2008 Homework #2 Due: before the start of lab January 30February 1 Electronic Submission: see Blackboard for details on how to submit your homework to your TA. For Questions 1 and 2, create a flowchart using Dia or Microsoft Word before writing your code. Attach your flowcharts (using the file naming scheme described below) to your homework as a .PNG file (if using Dia) or a .DOCX file (if using Microsoft Word.) Question 1 Write a function to solve Problem 28 on page 65 in Palm. This function should accept 2 inputs (W , A) with units m and m2 respectively. The function should return, as function output, 2 variables (L, T) representing the length L required so that the enclosed area is A, and L, the total length of the required fence. All calculations inside the function should be suppressed. Save this function as Palm_1_28_USERID.m. Question 2 Write a function to solve Problem 27 on page 65 in Palm. This function should accept 3 inputs (a, b, c). The function output should be the calculated values of x, y, and z. All calculations inside the function should be suppressed. Save this function as Palm_1_27_USERID.m Question 3 Write a program, Homework3_USERID.m, that calls the functions created in Question 1 and Question 2 (Palm_1_28_USERID and Palm_1_27_USERID). Pass in the values W=6 and A=80 into Palm_1_28_USERID and capture the output of the function call into the variables MyL and MyT. Pass in the values a=95, b=50, and c=145 into Palm_1_27_USERID and capture the output of the function call into the variables MyX, MyY, MyZ. ...
View Full Document
This note was uploaded on 05/15/2008 for the course ENGR 141 taught by Professor Bowman during the Spring '07 term at Clemson.
- Spring '07