Question: Java public class AutoSPC extends SPC{ // A spell checker which automatically selects a correction for a // misspelled term. Assume a parent class called

Java

public class AutoSPC extends SPC{ 
// A spell checker which automatically selects a correction for a 
// misspelled term. Assume a parent class called SPC is already built and it inherits most functionality from its parent 
 
 public static String twinCase(String bluePrint, String root); 
 // Utility method to take care of case matching between terms. See if 
 // parameter bluePrint is all caps or only the first character is 
 // capitalized and transform root to match the capitalization. In 
 // the event that the bluePrint is neither all caps nor capitalized 
 // followed by all lower case, return the root string as 
 // is. Examples are given below. 
 // 
} 

EXAMPLE should look like this

/ | Situation | model | source | return | // |-------------+--------+--------+--------| // | All Caps | BANANA | apple | APPLE | // | All Caps | PEAR | orange | ORANGE | // | Capitalized | Banana | orange | Orange | // | Capitalized | Apple | pear | Pear | // | Neither | banana | apple | apple | // | Neither | banana | Apple | Apple | // | Neither | BaNaNa | aPPle | aPPle | // | Neither | peaR | Orange | Orange | 

do not use built in functions that will make it easiser such as ArrayList.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!