Today was our fourth class meeting and we came out with five assignments. I have to say the last one made me a little nervous. Especially when the instructor told us we would really not like him when we got to step 4 and 5 of the fifth assignment. Guess what... I don't hate him at all. (Of course, it's yet to be seen if I did it "wrong")
The fifth assignment was a story problem instructing us to create a PHP script that fictional high school students could use to estimate the time and cost for their jobs mowing lawns around the neighborhood. Here's the text of the problem:
- The students use the following method to estimate the time and cost of their jobs for customers:
- Calculate the total area of the yard in m² (Multiply the length of the yard in meters by the width of the yard in meters)
- Calculate the total area of the house in m² (Multiply the length of the house in meters by the width of the house in meters)
- Subtract the total area of the house from the total area of the yard to find the total area of the lawn that must be mowed.
- Find the total time it will take to mow the lawn knowing that a high schooler can mow 4.3m² of lawn/minute
- Find the total cost for mowing the lawn. The high schoolers charge $10 per hour to mow the lawn
- Given the following dimenstion for a Customer:
- Length of Yard: 62 meters
- Width of Yard: 93 meters
- Length of House: 27 meters
- Width of House: 20 meters
Write a program which uses PHP to output the following (and then a sample text output that should appear on the page).
So, check out my page (P.S. It looks like the output with the correct calculations... YAY!)
And, here's a link to my main page I'll use throughout the semester to link to all my projects/assignments... if anyone cares!
So, here's the crazy thing. I finally understand the addiction of coding. I've had friends for years who were hard core coders. And, though I always appreciated their zeal and passion to just sit and write code... I actually understand and have experienced it myself tonight... whoa! More problems... more code! I'm ready! (I think I'm addicted!) Is there a CWA (Code Writers Anonymous) chapter near me? I may need it!
No comments:
Post a Comment