Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What is the output of the following code? (Assume each class is defined in a separate java file). 1. public class Frame 2. { 3.
What is the output of the following code? (Assume each class is defined in a separate java file). 1. public class Frame 2. { 3. private double length; 4. private double width; 5. public double xCoor; 6. private double y Coo; 7. 8. public Frame (double len, double w, double x, double y) { 9. 10. len = len; 11. width = w; 12. xCoor = x; 13. yCoo = y; 14. } 15. 16. public void FrameMinimize(double per) 17. { 18. length -= length*per ; 19. 20. } 21. public double getLen() 22. { 23. return length; 24. } 25. 26. } 1. public class Window { 2. 3. public static void main(String[] args) { 4. 5. Frame fr - new Frame (10,5, 3,6); 6. fr. FrameMinimize(.02); 7. System.out.println(fr.getLen()); 8. 9. } 10. 11. } O A. 0.0 O B. 9.8 O C. 10 O D.9.9
Step 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