Question: Write all the contents of a java file named 'WashingMachine.java' This file contacts the class washing Machine that represents a real-life washing machine. Every WashingMachine
Write all the contents of a java file named 'WashingMachine.java' This file contacts the class washing Machine that represents a real-life washing machine.
Every WashingMachine is identified by 3 attributes: a brand to identify the made of the WashingMachine(i.e "GM", "LG", Hoover") a capacity that a and integer number indicating the volume of the WashingMachine in cc (cubic centimerters), and a boolean variable ecoFriendly, that indicates if the WashingMachine is ecolgically frienldy (true) or not (false).
Write syntactically correct Java code for all the 3 attributes mentions above (use the names brand, capactiy and ecoFriendly) its 3 accessors methods (get methods). its 3 mutator methods (set.methods), and two appropriate contructor methods that initialize all its instance variables (one default and one with all attributes as a parameters) using the mutator methods. You must also write an equals methods that compares all attributes of WashingMachines for equality using the accessor methods.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
