Create a class "Math". Create two attributes (numbers) and create methods for mathematical operations like addition, subtraction etc. Create getter and setter methods for each attribute. Create instances of the class in a report. Make the attributes public and access them through the instances. Then change the methods to private and again try to access through the objects. Use the setter methods to set the attributes. Call the methods to get the results and display.
↧