CharacterAnalyzer

CharacterAnalyzer - { if (theChar >= 48...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//© A+ Computer Science - www.apluscompsci.com //Name - //Date - //Lab - import static java.lang.System.*; import java.util.Scanner; public class CharacterAnalyzer { private char theChar; public CharacterAnalyzer() { theChar = 0; } public CharacterAnalyzer(char c) { theChar =c; } public void setChar(char c) { theChar = c; } public char getChar() { return theChar; } public boolean isUpper( ) { return true; return false; } public boolean isLower( ) { return true; return false; } public boolean isNumber( )
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { if (theChar >= 48 && theChar <= 57) return true; return false; } public int getASCII( ) { int asc; asc = theChar; return asc; } public String toString() { if (isUpper() == true) return ""+getChar() + " is a uppercase character. ASCII == " + getASCII() + "\n"; if (isLower() == true) return ""+getChar() + " is a lowercase character. ASCII == " + getASCII() + "\n"; if (isNumber() == true) return ""+getChar() + " is a number. ASCII == " + getASCII() + "\n"; return "\n"; } }...
View Full Document

Page1 / 2

CharacterAnalyzer - { if (theChar >= 48...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online