
Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff. acceptClothes accepts the noofClothes as argument & returns the noofClothes

public class WashingMachine{
public void switchOn(){
}
public int acceptClothes(int noofClothes){
return noofClothes;
}
public void acceptDetergent(){
}
public void switchOff(){
}
public static void main(String[] args){
WashingMachine wm = new WashingMachine();
wm.switchOn();
int clothesAccepted = wm.acceptClothes(10);
wm.acceptDtergent();
wm.switchOff();
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.