Question: the class, add two public methods use of the two given methods setNumber O and gotNumber (a) (4 points) Add a method increment that adds

 the class, add two public methods use of the two given

the class, add two public methods use of the two given methods setNumber O and gotNumber (a) (4 points) Add a method increment that adds 1 to the value of m the outline of a simple class called BusyWork. In the blank space provided in to the class. The two methods that you add can make 1 (6 points) Add a method decrement ) that returns a BusyWork object whose value of m is one less than the value stored in the object the method is called on. This method should not modify the m in the object the method is called on. class BusyWork private int m = 0; public void setNumber (int newM) this.m newM; public int getNumber ( return this.m; // write the methods increment ) and decrement ()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!