Essays24.com - Term Papers and Free Essays
Search

Enge 1216 Program Is Designed for a Common Backpacker

Essay by   •  April 14, 2019  •  Essay  •  689 Words (3 Pages)  •  976 Views

Essay Preview: Enge 1216 Program Is Designed for a Common Backpacker

Report this essay
Page 1 of 3

1

My program is designed for a common backpacker to use to find how much his/her pack can carry. The program can be however long the user wants but I am scaling it to a typical three-day trip. The user enters however many items he/she wants to carry in the backpack and enters how much each of those items weighs. After that he/she enter the quantity of each item and my program will determine the total weight of the items carried. It outputs the total recommended weight to carry along with the table of each item weight. As well as saying if the user is above or below their max.

2

The “budget” for my program was set to 20% of the user’s body weight in lbs. I chose this because typically a person should be able to carry 20% of their body weight on long camping trips.

The 5 items I chose to use as inputs are: backpacking stove, clothes, food, shoes, and tent. I chose these because they are the most common things to carry when camping. The only item left off is water, but I was assuming that the water the user carried was filtered out of water sources and not placed into the pack.

Each item I chose has an average weight that backpackers carry. A backpacking stove is about 1 lbs. Clothes typically weigh about 1lb per outfit including jackets. People normally carry 2 pair of extra shoes which weigh about 2 lbs. A good backpacking tent is lightweight and weighs 2.5 lbs. You typically carry 2 lbs of food per day.

The function I used was to calculate the overall weight of each item. It takes the base weight and multiplies it by the quantity.

The for loop runs the function for each input variable. It indexes every time for the length of the vector and makes sure that each value is placed into a new vector.

The fprintf portion of my code deals with comparing the carrying weight to the sum of all the items. fprintf displays the weight of all the items in columns and then outputs how far under or over the total weight it compared to the carrying weight.

Displaying a string array was challenging to learn. Instead of using f at the end you have to use s. The fprintf displays the text array then the rest of the data inputs.

3

My program’s limitation is that the unit weight must be an average otherwise it would not be accurate. Another limitation is the fact that people can carry more than 20% of their body weight and some people can carry less than that. An assumption I made was that people can only carry 20% of their body weight. Another assumption I made was that all clothing and food items weigh the exact same and that the user gets water from local sources not carried in.

4

One ethical consideration considered would be if someone fails to listen to my program and goes above their weight then that could possibly be hurtful to a group or that person. My program gives the recommended weight and tells the user if he/she is above the max, taking that into consideration would mean that the user needs to listen to the program and not go over the max. If the user was in a group and decided to go over the max that could possibly slow down the group and create a liability.

...

...

Download as:   txt (4.2 Kb)   pdf (156.6 Kb)   docx (35.9 Kb)  
Continue for 2 more pages »
Only available on Essays24.com