Question: Create an abstract CloudStorage class that describes cloud storage data and provides methods to access the data. Design: The CloudStorage class has fields, a constructor,
Create an abstract CloudStorage class that describes cloud storage data and provides methods to access the data. Design: The CloudStorage class has fields, a constructor, and methods as outlined below. Fields: instance variables protected for: name of type String and base storage cost of type double.class variable protected static for the count of CloudStorage objects that have been created; set to zero when declared and then incremented in the constructor.These are the only fields that this class should have. Constructor: The CloudStorage class must contain a constructor that accepts two parameters representing the instance variables name and base storage cost and then assigns them as appropriate. Since this class is abstract the constructor will be called from the subclasses of CloudStorage using super and the parameter list. The count field should be incremented in the constructor. Methods: Usually a class provides methods to access or read and modify each of its instance variables known as get and set methods along with any other required methods. At minimum you will need the following methods.o getName: Accepts no parameters and returns a String representing the name. o setName: Accepts a String representing the name, sets the field, and returns nothing.o getBaseStorageCost: Accepts no parameters and returns a double representing base storage cost. o setBaseStorageCost: Accepts a double representing the base storage cost, sets the field, and returns nothing.o getCount: Accepts no parameters and returns an int representing the count. Since count is static, this method should be static as well.o resetCount: Accepts no parameters, resets count to zero,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
