answersLogoWhite

0


Best Answer

A set function (or setter) is an object mutator. You use it to modify a property of an object such that the object's invariant is maintained. If the object has no invariant, a setter is not required.

A get function (or getter) is an object accessor. You use it to obtain a property from an object such that the object's invariant is maintained. If the object has no invariant, you do not need a getter.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you use set and get in object-oriented programming?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is answer set programming?

programming is set and develop for software &what uou want you will get output


What are the words that a programming language has set aside for its own use?

Such words are called "keywords".


What are you use of loops?

A loop is used in programming to repeat a set of commands in the program when a task is a repetitive one


How to use NS2 programming?

you don't need to use ns2 programming


Which words that a programming language has set aside for its own use?

Its called "Keywords" Check the related links for more information.


Why do you need another programming language?

We have many programming languages because no one language is perfect. Some are very good at some very specific things, but are horrible for others. When we are presented with a problem, we have a large set of programming languages in which to find an appropriate language to use.


How do you solve a fixed cost problem?

Fixed Cost Problem is a kind of the Mixed Linear Programming Problem(MILP).Also, MILP is a Parametric Quadratic Concave Programming Problem. The optimal solution is existence of vertix set of the domain set. Then, you can use the domain cutting method.


What are the Characters in java?

The Java programming language is represented by the basic source character set from the US variant of the international 7-bit character set ISO 646-1983 called ASCII (ANSI3.4-1968). This is the same character set used by both C and C++ and also by the vast majority of high and low level programming languages. To use an extended character set for source code, the programming environment needs to map the extended character set into the basic source set. This can be achieved in several ways, such as by utilising universal character names.


How do you use the word input in a sentence?

"You only use it in programming".Thank you for your incorrect input!


What is the use of keyword new used in AWT programming?

what is the use of new keyword in awt programming


What is the difference between oriented programming language and high programming language?

Set/subset: Some high level programming languages are object oriented, but not all of them.


Why you use programming in computer?

to use what i program