1 class Main { 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 е 1 2 3 4567 function void main() { // Declare local variables var int x1, y1, x2, y2; // Initalize the variables let x1 = 0; let y1 = 0; let x2 = 30; let y2 = 30; // Move the square to the Right while (x2 <482) { // Draw the rectangle in black do Screen.setColor(ture); //let's draw a rectangle on Screen do Screen.drawRectangle(x1, y1, x2, y2); // wait for 1/2 second (500 msec) do Sys.wait(500); //Draw the same rectangle again (in white) do Screen.setColor(false); do Screen.drawRectangle(x1, y1, x2, y2); // Update the coordinates to move the square Right let x1 = x1 + 30; let x2 = x2 + 30; }
1 class Main { 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 е 1 2 3 4567 function void main() { // Declare local variables var int x1, y1, x2, y2; // Initalize the variables let x1 = 0; let y1 = 0; let x2 = 30; let y2 = 30; // Move the square to the Right while (x2 <482) { // Draw the rectangle in black do Screen.setColor(ture); //let's draw a rectangle on Screen do Screen.drawRectangle(x1, y1, x2, y2); // wait for 1/2 second (500 msec) do Sys.wait(500); //Draw the same rectangle again (in white) do Screen.setColor(false); do Screen.drawRectangle(x1, y1, x2, y2); // Update the coordinates to move the square Right let x1 = x1 + 30; let x2 = x2 + 30; }
Chapter3: Using Methods, Classes, And Objects
Section: Chapter Questions
Problem 16RQ
Related questions
Question
100%
please convert the code in this picture to text only
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
Unlock instant AI solutions
Tap the button
to generate a solution
Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning