Answered step by step
Verified Expert Solution
Link Copied!
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

image text in transcribed

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 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students explore these related Databases questions