Write a Java assignment that simulates the behavior of a Casinowith three slot machines.
Motivation: Practice with the Object-Oriented concepts ofinheritance and overriding.
Here are the rules for each machine
Machine A:
Cost of a game: 1 token
Number of reels: 4
Each reel can display a SUN or a MOON
The machine pays off 2 tokens if one and only one reel displaysa sun
The machine pays off 100 tokens if ALL the reels display asun
Machine B:
Cost of a game: 1 token
Number of reels: 3
Each reel can display an ORANGE, or a CHERRY, or a WATERMELON ora QUESTION MARK.
The machine pays off 500 dollars if ALL the
OR
OR