πThe LSP, in simple terms, states that objects of the same superclass should be able to be swapped with each other without breaking anything.
π If we have a Cat and a Dog class derived from an Animal class, any functions using the Animal class should be able to use Cat or Dog and behave normally.
π getWordCounts β group a given sentence by its wordβs counts
π getWordLength β group a given sentence by its wordβs length
π getWordLength_List β group a given sentence by its wordsβ length, return it as a List
π getWordLength_Set β group a given sentence by its wordsβ length, return it as a Set
π getwordLength_String β group a given sentence by its wordsβ length and return it as a String
π We can use lambda expressions to define our Predicate or implement the Predicate interface. If we want to combine different Predicate objects, we can use the or, and, and negate methods of the Predicate interfaces. These are default methods of the interface and will return a new Predicate.
π Itβs October 2001 and Apple is releasing the first iPod, which will revolutionize the portable media player market. Your job is to implement the song shuffle feature. Using your favorite programming language (Java), you need to implement this feature.
π It is a principle that helps people remember that object-orientation is about bundling data with the functions that operate on that data. It reminds us that rather than asking an object for data and acting on that data, we should instead tell an object what to do. This encourages to move behavior into an object to go with the data. https://dev.to/guifroes/solving-real-world-bad-design-by-applying-the-tell-don-t-ask-principle-607