Question OOP-ENC-0070
HardWhat is the 'tell, don't ask' principle?
- A.
Never call methods
- B.
Ask the user for input
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Encapsulation question
What is the 'tell, don't ask' principle?
Never call methods
Ask the user for input
Sign up free to see the answer and a step-by-step explanation.
Ask objects to do work with their data instead of pulling the data out and deciding for them
Always use getters