| ||Graphical user interfaces rely on text routines to properly display words on various GUI components. Being able to determine the width in pixels of a line of text is useful for centering the text in a window. You will be given a sentence of letters and spaces. You will also be given the letter widths for both uppercase and lowercase letters of a particular font. You must return the width of the sentence.
Both uppercase and lowercase contain 26 elements. The first element of uppercase is the width of 'A' and the last is the width of 'Z'. The first element of lowercase is the width of 'a' and the last is the width of 'z'. The width of the space character is always 3 pixels. When a line of text is rendered, there is a gap of 1 pixel between each pair of adjacent characters.
|Parameters:||String, int, int|
|Method signature:||int getPixelWidth(String sentence, int uppercase, int lowercase)|
|(be sure your method is public)|
|-||sentence will contain between 1 and 50 characters, inclusive.|
|-||sentence will only contain uppercase letters ('A'-'Z'), lowercase letters ('a'-'z'), and spaces.|
|-||uppercase will contain exactly 26 elements.|
|-||lowercase will contain exactly 26 elements.|
|-||Each value in uppercase and lowercase will be between 1 and 36, inclusive.|
D e a d (space) B e e f
7+1+4+1+5+1+4+1 + 3 + 1+6+1+4+1+4+1+4 = 49
"ThE qUiCk BrOwN fOx JuMpEd OvEr ThE lAzY dOg"