Question: construct a class called Toothbrush in JAVA , representing an electric toothbrush, with attributes being the brand, the color (using Color class), and the softness
construct a class called Toothbrush in JAVA , representing an electric toothbrush, with attributes being the brand, the color (using Color class), and the softness hard, medium, soft. Methods required include a default constructor with no arguments, a constructor with all arguments, all getter and setter methods, and a toString method. There is also a brushTeeth method which uses a random generator to determine how many seconds of brushing there will be, between 100 and 1000. Write a TestToothbrush program to create 3 objects of type Toothbrush and to test all getter methods, toString method, and brushTeeth method in the Toothbrush object.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
