I am writing a quote matching program that requires two abstract Factory templates, these are two interfaces; QuoteFactory and ModeFactory . ModeFactory switches between EasyMode and HardMode , and QuoteFactory selects quotes between several different topics (i.e. Political Circles , SportsQuotes ). In short, the user will select the mode, if EasyMode is selected, then the user must guess the quote, while if the user selects HardMode, the user will be told who said the quote and then guess, so the implementation of quotes will vary depending on the mode and the selected quotes .
So far I have created ModeFactory as an interface and implemented it in EasyMode and HardMode, but now I need to somehow integrate another abstract Factory template (or more) into these modes so that Quotes can be selected. If this is useful, I also created a Quote class that defines my quotes.
Can someone help me come up with a basic implementation of these abstract factories? These are sketches of what I still have, although I cannot help but feel that I have somehow overdone it ...
EDIT: repeat what I mean: if the user selects Easy Mode, they are given the beginning of the quote and the author of this quote, whereas if they choose hard mode, they are provided only from the beginning of the quote. for instance
Easy mode: "I felt the power ..." Jose Mourinho
Hard mode: "I felt the power ..."
Hard mode does not allow the author to complicate the user the ability to guess the rest of the quote. In addition, this is not a school assignment. I read Head First Design Patterns, and now I'm trying to apply what I learned in different situations (instead of the Pizza example, I'm working on a Guessing Game quote after reading QI (British TV Show).
public interface ModeFactory { public Mode retrieveMode(String s); } public interface QuoteFactory { public Quote retrieveQuote(String s); }