-
Write a function that detects if two strings are an anagram e.g. ‘bleat’ and ‘table’ are anagrams but ‘eat’ and ‘tar’ are not.
-
Explain the design pattern used in following:
interface Vehicle { int set_num_of_wheels() int set_num_of_passengers() boolean has_gas() }
a) Explain how can you use the pattern to create car and plane class?
b) Use a different design pattern for this solution.
- Write a video player application with ‘Play’, ‘Forward’, ‘Rewind’ functionalities. Please write pseudocode for this program and explain the design pattern you will use to develop these three functionalities.