Question
Lab Goal : This lab was designed to teach you more about the String class and how if statements are used. Sample Data : hello
Lab Goal : This lab was designed to teach you more about the String class and how if statements are used.
Sample Data :
hello goodbye
one two
three four
TCEA UIL
State Champions
ABC DEF
four five
whoot what
Sample Output :
hello does not have the same # of letters as goodbye
one has the same # of letters as two
three does not have the same # of letters as four
TCEA does not have the same # of letters as UIL
State does not have the same # of letters as Champions
ABC has the same # of letters as DEF
four has the same # of letters as five
whoot does not have the same # of letters as what
STRINGLENGTHCHECK CODE SHELL:
import static java.lang.System.*;
public class StringLengthCheck { String wordOne, wordTwo;
public StringLengthCheck() { }
public StringLengthCheck(String one, String two) { }
public void setWords(String one, String two) { }
public boolean checkLength( ) { return false; }
public String toString() { return wordOne + " does not have the same # of letters as " + wordTwo + " "; } }
STRINGLENGTHCHECKRUNNER CODE SHELL:
import static java.lang.System.*;
public class StringLengthRunner { public static void main( String args[] ) { //add test cases } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started