Answered step by step
Verified Expert Solution
Question
1 Approved Answer
what is the output please J7 class Games public int price public Game(int ax/ price-a; public int getDiscount(int d) return priced:) public static void main(String
what is the output please
J7 class Games public int price public Game(int ax/ price-a; public int getDiscount(int d) return priced:) public static void main(String stry Game gi - new Game(30) Park wmg = new Parko: Park dsa - new Parkg1): System.out.printlnwmg.getWaterRide.getDiscount) // output 1 Park fjr - dsa.build: fjr.setWaterRide(new Game(25)): System.out.printin(dsa.getWater RideO-price // output 2 Park pps - new Parko: Game g2 - fr.getWaterRide: 32.price = 22: System.out.printincfr.getWater Ride.price); class Park private Game waterRide. private static int ghost - O: public Parko this(new Game(20)); ghost > public Park Game EX waterRide = ghost+ > public void setWaterRideGamer) waterRide- public Game getWaterRide(){return waterRide:} public Park build{ return this:) public static int getGhost0{ return ghost:) I output 3 System.out.println(Park.getGhostox // output 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started