0

It still gives me error

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 class Standard { protected void draw() { System.out.println("Drawing"); } protected void write() { System.out.println("Writing"); } } //fix the class class Pro extends standard{ 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(); } }

7th Sep 2022, 12:07 PM
Ahmed Tamer
Ahmed Tamer - avatar
5 odpowiedzi
+ 5
wo...lots of tags... seems like you pasted the code in it ... in line after //fix the class S should be in capital letter . so it should be Standard and not standard .
7th Sep 2022, 12:14 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 4
class Standard { protected void draw() { System.out.println("Drawing"); } protected void write() { System.out.println("Writing"); } } //fix the class class Pro extends Standard{ 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(); } }
22nd May 2023, 7:12 AM
Esteban Perez-Ortiz
Esteban Perez-Ortiz - avatar
+ 2
Thanks a lot guys Really appriciated
7th Sep 2022, 12:31 PM
Ahmed Tamer
Ahmed Tamer - avatar
0
use capital S instead of small
28th Dec 2022, 7:26 AM
Tapas Nalge