English

Differentiate between pure and impure methods. - Computer Applications

Advertisements
Advertisements

Question

Differentiate between pure and impure methods. 

Distinguish Between

Solution

S. No. Pure method Impure method
1. A method that returns a value to its caller module is known as a "pure method." An impure method may not return any value. It simply modifies the state of an object during a call.
2. This method, often known as the "accessor method," does not modify an object's properties. An Impure method, often known as a Mutator, modifies the state of an object.
shaalaa.com
  Is there an error in this question or solution?
Chapter 5: User - Defined Methods - EXERCISES [Page 337]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 5 User - Defined Methods
EXERCISES | Q VI. 9. | Page 337
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×