This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* N: formatName | |
* P: Take any full name and make proper with casing | |
* I: 1 String (name) | |
* R: String | |
*/ | |
public String formatName(String n) { | |
int spaceIndex = n.indexOf(" "); | |
String firstName = n.substring(0, spaceIndex); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* N: formatName | |
* P: do all String methods to return a name "First Last" | |
* I: 1 String with 2 words separated by a space | |
* R: String | |
*/ | |
public String formatName(String n) { | |
int spaceIndex = n.indexOf(" "); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Card { | |
private int value; | |
private String suit; | |
private String character; | |
public Card(int v, String s, String c) { | |
value = v; | |
suit = s; | |
character = c; | |
} |