/** * Exercise 7.10 p 251 b and c. Skip a. */ public class Exercise710 { /** * Return the largest of the 3 doubles a, b and c */ public double maxOf(double a, double b, double c) { } /** * Return the integer value of an hexadecimal character.
* Return -1 if the character is not an hexadecimal character. */ public int hexValue(char c) { // To compute the integer values, use the characters' Unicode codes // e.g.for c='0',...,'9', c-'0' is understood as Unicode(c)-Unicode('0') // Since '0','1','2',...,'9' are in this order in Unicode, // c-'0' gives the integer value of the digit represented by c // Do the same thing with c='A',...,'F', but add 10 since A is 10 // in hexadecimal. } }