EngE 1114 HW3

# EngE 1114 HW3 - algorithms to determine the total admission...

This preview shows page 1. Sign up to view the full content.

EngE 1114 HW3 The only built in MATLAB functions that may be used in this assignment are sqrt and trig functions. Add help comments to your file and other comments as necessary to describe your algorithm. The first comment should match the header requirements for homework, without pagination. Problem1: Problem 1 assumes that you have completed the Programming 2 Worksheet from your Week 2 Workshop and have viewed the Equivalent Logic Presentation. Consider an attraction, such as a science museum, that offers group rates based on the size of the group. The individual entry fee is \$7.00 The family rate, for groups of 4 8 people is \$6.50/person The small group rate, for groups of 9 20 people is \$6.00/person And the class rate, for groups larger than 20 people is \$5.00/person. Prepare two
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: algorithms to determine the total admission price to the museum based on the group size or the number of tickets being purchased. Algorithm 1 will use a stacked if structure and logical operators to correctly determine the cost. Algorithm 2 will use an elseif structure. No logical operators are permitted in algorithm 2. User input to both programs will be the group size (number of tickets being purchased). Output will be the total cost of the tickets expressed as \$x.xx. Submit the flowchart, listing, and output from 4 sample runs with each algorithm. Use the following input values for the sample runs: 1, 4, 9, 25. In your discussion address the difference between the two decision structures used to solve this problem and why one is more efficient than the other....
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern