Question: Test Description: Create a class called WordPlay. WordPlay is a class that represents a single word (any string containing lower-case, alphabetic characters), and defines several


Test Description: Create a class called WordPlay. WordPlay is a class that represents a single word (any string containing lower-case, alphabetic characters), and defines several operations on that word, as well as between two WordPlay objects. Below are the required WordPlay methods and their descriptions. public static String getAuthorName() (1 mark) Returns your name in the format "Lastname, Firstname". public static String getRyersonID) (1 mark) Returns your Ryerson ID as a string without any spaces. For example, "123456789" public WordPlay (String word) (4 marks) Your WordPlay class should contain a single constructor that accepts a String as an argument. If word contains any non-alphabetic characters, remove them. Any capital letters should be changed to lower case. public int uniqueCharCount() (3 marks) Returns the number of unique characters in the word. If the word was "salads" this method would return four because 'a' and 's' each appear twice. public boolean contains (String s) (5 marks) This method returns true if the characters of this WordPlay object can be used to create String s. It's OK if there's characters left over. A WordPlay object containing the word "salad" should return true for contains("sad"), contains("lad"), and contains("salad") However, it should return false for contains("add"), because "salad" only has one 'd
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
