ICS4U String Functions Java GUI Programming Using OOP Assignment
For this assignment, you will be using a GUI Interface to practice Object-Oriented Programming concepts and modular design
Make a GUI interface for a Java program that will use a text field as input, use Button objects to input choice and a Label object to output the answer at the bottom of the window.
-
Design and code a user friendly GUI similar to the one shown below: [8]
-
Coding: Create the following public methods that taking the appropriate parameters and return a String that can be used to output the answer using the Label at the bottom of the window. findLength() → calculates the length of the string lowerCaseit() → Change the string to be all lower case AllCapsit() → Change the string to be all upper case lastChar() → returns the last character of the string replaceSpace() → replaces all spaces with “-” (dash) character [20]
-
Coding: Call the public functions listed above when the appropriate button is pressed [10]
-
Use the output of the methods above to set the Label at the bottom of the window. [10]