6:23 LTE E LAB 09 GRADED TASK 1 INSTRUCTIONS Description In this task, you have to implement the changeScreen(ColorImage

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

6:23 LTE E LAB 09 GRADED TASK 1 INSTRUCTIONS Description In this task, you have to implement the changeScreen(ColorImage

Post by answerhappygod »

6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 1
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 1 (34.56 KiB) Viewed 62 times
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 2
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 2 (45.76 KiB) Viewed 62 times
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 3
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 3 (35.88 KiB) Viewed 62 times
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 4
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 4 (33.88 KiB) Viewed 62 times
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 5
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 5 (30.84 KiB) Viewed 62 times
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 6
6 23 Lte E Lab 09 Graded Task 1 Instructions Description In This Task You Have To Implement The Changescreen Colorimage 6 (24.71 KiB) Viewed 62 times
6:23 LTE E LAB 09 GRADED TASK 1 INSTRUCTIONS Description In this task, you have to implement the changeScreen(ColorImage, int, int, int, int, int) method for producing a screen transition effect. Note that it must be implemented as a recursive method. The method draws four rectangular stripes repeatedly on a given Colorimage in a recursive manner as illustrated in the diagram below: From step 1 to step 4. stripes are

6:23 I LTE From step 1 to step 4, stripes are drawn from left to right, top to bottom, right to left and bottom to top on the ColorImage. Note that step 1 to step 4 should be completed in a single recursive call. The process of drawing stripes is then repeated in the remaining center area from step 5 to step 8 in another recursive call. The process of drawing stripes repeats until the remaining area is too small for drawing two horizontal stripes or two vertical stripes without overlapping. In this case, a single stripe should be drawn from left to right, covering up the remaining area. The table below describes the parameters of the changeScreen(ColorImage, int, int, int, int, int) method:

6:23 LTE Parameter Parameter Name Type Description image Colorimage The Colorimage that the Stripes are drawn on XY int, int The (x, y) position of the top left corner of the remaining area. width int The width of the remaining area. height int The height of the remaining area. stripeSize int The thickness of the rectangular stripe to be drawn. To assist you in drawing the rectangular stripes, another method, animateStripe(ColorImage. int, int, int, int, String) is provided which can be used to draw a stripe on a Colorimage. The descriptions for the method parameters are given as follows: Parameter Parameter Name Type Description image Colorimage The Colorimage that the stripe is drawn on left, top int, int The (x,y) position of the top left corner of the stripe. length int The length of the stripe.

6:23 I LTE Parameter Parameter Name Type Description image Colorimage The Colorimage that the stripe is drawn on. left, top int, int The (x, y) position of the top left corner of the stripe. length int The length of the stripe. stripe Size int The thickness of the stripe. direction String The direction of drawing the stripe. Possible values are: "toRight" • "toBottom" • "toLeft" • "toTop As an example for using the animateStripe(ColorImage, int, int, int, int, String) method, the following code will draw a stripe from right to left that is 100 units long, 50 units thick and with the top left hand corner positioned at

6:23 I LTE (20, 30). animateStripe (colorImage, 20, 30, 100, 50, "toLeft"); Testing To test your implementation, right click on the Lab03Task1Test class and invoke the test() method. A canvas will pop up and show the transition effect implemented. Two messages will be printed on the console to verify that the starting and ending of the transition effect is working correctly Lab03Task 1 Test new Labo3TaskiTesto void testo Open Editor Compile Inspect Remove - Bluek Terminal Window-COMP 102.2 Lab 03 Demo Options Transition effect starts. Transition effect ends. Submission

6:23 I LTE Submission The declaration of the method is already given. You only need to complete the body of the method in the LAB 03 GRADED TASK 1 textbox below. public void changeScreen(Color Image image, int x, int y, int width, int height, int stripeSize) { // Please write your code after this line } Lab 09 Graded Task 1 0.0/1.0 point (graded) 1// Please write your code after this ling 2
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply