COSC 1437 Tarrant County College District Programming Lab Report

COSC 1437 Programming Fundamentals IIBy FirstName LastName
16
Exceptions & templates
Exercise 1:
Write templates for the two functions minimum and maximum. The minimum function should
accept two arguments and return the value of the argument that is the lesser of the two. The
maximum function should accept two arguments and return value of the argument that is the
greater of the two. Design a simple driver program that demonstrates the templates with various
types.
Exercise 2:
Write a function template that accepts an argument and returns its absolute value. The absolute
value of a number is its value with no sign. For example, the absolute value of -7 is 7, and the
absolute value of 6 is 6. Test the template in a single driver program.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER