Part 1: A class is a blueprint for an object. A class may have a default constructor, a constructor with arguments, accessor methods, mutator methods, public fields, and private fields. Choose a category (such as animal, vehicle, and so on) and describe how you would design a class for it. Most importantly, include methods relevant to the class. Provide a Java class definition for your selected category. That is, if you selected animal, then provide the Java class definition of a class called Animal. Part 2: With the class designed in the other supporting activity, modify it so that it has data encapsulation.
Get Free Quote!
353 Experts Online