Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA You are developing your own photo editing application. The standard free version allows you to draw and write text on a photo. The Pro

JAVA

You are developing your own photo editing application. The standard free version allows you to draw and write text on a photo. The Pro subscription has 2 more features - the ability to use effects and the ability to change resolution. Complete/fix the given code to inherit Pro class from Standard class and successfully execute all the given method calls.

Be attentive to access modifiers.

//be attentive to access modifiers

class Standard {

protected void draw() {

System.out.println("Drawing");

}

private void write() {

System.out.println("Writing");

}

}

//fix the class

class Pro{

protected void useEffects() {

System.out.println("Using Effects");

}

protected void changeResolution() {

System.out.println("Changing Resolution");

}

}

public class Main {

public static void main(String[] args) {

Standard standard1 = new Standard();

Pro pro1 = new Pro();

//standard version

standard1.draw();

standard1.write();

//Pro version

pro1.draw();

pro1.write();

pro1.useEffects();

pro1.changeResolution();

}

}

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

=+2 How does the preparation and support for each type of IE vary?

Answered: 1 week ago