Question: java programming Write a class named Bottle. The class should have a double field that holds the size of the Bottle as the volume in

java programming
Write a class named Bottle. The class should have a double field that holds the size of the Bottle as the volume in fluid ounces. There are 8 fluid ounces in a cup. The class also tracks the number of Bottle objects created. In addition, provide the following methods: 1. A no-arg constructor. 2. A constructor that accepts one or more parameter(s) based on the number of fields in the class. 3. Member method(s) that sets the value(s) of your field(s). 4. Member method(s) that return(s) the value in the member field(s). You should have a method for each member field of your class. A method that returns the size of the object in cups. a. b. 5. 6. A toString method. An equals method that accepts an object of your class as an argument. If the argument object holds the same data as the calling object, this method should return true. Otherwise, it should return false 7. A great object's member true. Otherwise, A lessThan method th member field is less Otherwise, it should return false. erThan method that accepts an object of your class as an argument. If the calling ield is greater than the argument's member field, this method should return it should return false. 8. at accepts an object of your class as an argument. If the calling object's than the argument's member field, this method should return true. using a driver class to test each of the iti Ss
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
