Question: Using the Picture class from Worked Example 6.2, write a method: that superimposes two pictures, yielding a picture whose width and height are the larger
Using the Picture class from Worked Example 6.2, write a method:
![]()
that superimposes two pictures, yielding a picture whose width and height are the larger of the widths and heights of pic1 and pic2. In the area where both pictures have pixels, use pic1, except when its pixels are green, in which case, you use pic2.
Data from worked example 6.2.


![]()


•
public static Picture greenScreen (Picture picl, Picture pic2)
Step by Step Solution
3.37 Rating (150 Votes )
There are 3 Steps involved in it
Based on the provided information we need to write a method called greenScreen that takes two Picture objects pic1 and pic2 as parameters and superimp... View full answer
Get step-by-step solutions from verified subject matter experts
