Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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