Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Letter.java
- ------------------------------------------------------
- public class Letter {
- public final double XHEIGHT = 6;
- public final double DEFAULT_DEPTH = 0;
- public String letter;
- private double size;
- public double height;
- public double depth;
- public Letter( String inputLetter ) {
- this.letter = inputLetter;
- this.height = XHEIGHT;
- this.depth = DEFAULT_DEPTH;
- }
- public void setHeight( double newHeight ) {
- this.height = newHeight;
- }
- public void setDepth( double newDepth ) {
- this.depth = newDepth;
- }
- public void calculateSize( ) {
- size = height + depth;
- }
- }
- ----------------------------------
- lowerCase.java
- ----------------------------------
- public class lowerCase extends Letter {
- public lowerCase( String inputLetter ) {
- inputLetter = inputLetter.toLowerCase( );
- this.letter = inputLetter;
- this.height = XHEIGHT;
- this.depth = DEFAULT_DEPTH;
- }
- }
Add Comment
Please, Sign In to add comment