Playing Field -values: Arra Field wheels: Array List HWheel +Playing Field +spin
ID: 3823200 • Letter: P
Question
Playing Field -values: Arra Field wheels: Array List HWheel +Playing Field +spin0 St SlotMachine: Add a set Bonus method which creates an instance of Bonus Playing Field and saves it in its playingField attribute. Add a set Regular method which creates an instance of Playing Field and saves it in its playingField attribute. Change the line in the SlotMachine constructor that createst the PlayingField object to just call the setRegular method. Bonus Playing Field added or revise this lab assignm +Bonus playingfield doubExplanation / Answer
public class SlotMachine {
private PlayingField playingField;
public SlotMachine() {
this.setRegular();
}
public void setBonus(){
this.playingField=new BonusPlayingField();
}
public void setRegular(){
this.playingField=new PlayingField();
}
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.