SlideShare a Scribd company logo
1 of 1
Download to read offline
Add an object that flies from left to right, over and over. The object can be simple but should be
of your own design. It should use at least three shapes (e.g., the plane in the example uses one
rectangle and two triangles). The objects coordinates should be stored globally, because we will
need to remember where the object is from one frame to the next. A drawXXXXX() function
(where XXXXX is your object) should use the current position of the object to draw the object.
The object should be near the top of the canvas. A moveXXXXX() function (where XXXXX is
your object) should update the position of the object, using a SPEED constant to determine how
much the object should move from one frame to the next. The moveXXXXX() function should
make the object wrap, so that once it has gone off the right side of the canvas, it reappears from
the left side of the canvas. The object should move completely out of view (off the canvas)
before reappearing, and when it reappears, it should appear to emerge from the left side (i.e., you
should not see the entire object pop into view: it will gradually fly off the right side of the
canvas, then fly onto the canvas from the left side). moveXXXXX() and drawXXXXX() should
be called from draw().

More Related Content

More from info245627

Activity 1 The role of government in promoting business ethics Disc.pdf
Activity 1 The role of government in promoting business ethics Disc.pdfActivity 1 The role of government in promoting business ethics Disc.pdf
Activity 1 The role of government in promoting business ethics Disc.pdfinfo245627
 
Ace Inc. has five employees participating in its defined-benefit pen.pdf
Ace Inc. has five employees participating in its defined-benefit pen.pdfAce Inc. has five employees participating in its defined-benefit pen.pdf
Ace Inc. has five employees participating in its defined-benefit pen.pdfinfo245627
 
Accrued liability for utilities. Account #1 correct Account Type cor.pdf
Accrued liability for utilities. Account #1 correct Account Type cor.pdfAccrued liability for utilities. Account #1 correct Account Type cor.pdf
Accrued liability for utilities. Account #1 correct Account Type cor.pdfinfo245627
 
Accounting Elements Label each of the following accounts as an Asset.pdf
Accounting Elements Label each of the following accounts as an Asset.pdfAccounting Elements Label each of the following accounts as an Asset.pdf
Accounting Elements Label each of the following accounts as an Asset.pdfinfo245627
 
Accounts in a company�s general ledger are divided into different ca.pdf
Accounts in a company�s general ledger are divided into different ca.pdfAccounts in a company�s general ledger are divided into different ca.pdf
Accounts in a company�s general ledger are divided into different ca.pdfinfo245627
 
actuarial science statistics required! Let X be a truncated Poisson .pdf
actuarial science statistics required! Let X be a truncated Poisson .pdfactuarial science statistics required! Let X be a truncated Poisson .pdf
actuarial science statistics required! Let X be a truncated Poisson .pdfinfo245627
 
Acuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdf
Acuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdfAcuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdf
Acuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdfinfo245627
 
All of the following contributed to a surge in international lending.pdf
All of the following contributed to a surge in international lending.pdfAll of the following contributed to a surge in international lending.pdf
All of the following contributed to a surge in international lending.pdfinfo245627
 
All of these statements are correct EXCEPT for which of the followin.pdf
All of these statements are correct EXCEPT for which of the followin.pdfAll of these statements are correct EXCEPT for which of the followin.pdf
All of these statements are correct EXCEPT for which of the followin.pdfinfo245627
 
All of the following statements accurately describe manager�employee.pdf
All of the following statements accurately describe manager�employee.pdfAll of the following statements accurately describe manager�employee.pdf
All of the following statements accurately describe manager�employee.pdfinfo245627
 
All of the following explain why spending on healthcare in the Unite.pdf
All of the following explain why spending on healthcare in the Unite.pdfAll of the following explain why spending on healthcare in the Unite.pdf
All of the following explain why spending on healthcare in the Unite.pdfinfo245627
 
Alibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdf
Alibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdfAlibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdf
Alibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdfinfo245627
 
Ali has a small construction company. During the year, he paid Will .pdf
Ali has a small construction company. During the year, he paid Will .pdfAli has a small construction company. During the year, he paid Will .pdf
Ali has a small construction company. During the year, he paid Will .pdfinfo245627
 
Algunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdf
Algunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdfAlgunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdf
Algunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdfinfo245627
 
Alguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdf
Alguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdfAlguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdf
Alguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdfinfo245627
 
Alexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdf
Alexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdfAlexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdf
Alexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdfinfo245627
 
Aggregate demands downward-sloping character reflects three princip.pdf
Aggregate demands downward-sloping character reflects three princip.pdfAggregate demands downward-sloping character reflects three princip.pdf
Aggregate demands downward-sloping character reflects three princip.pdfinfo245627
 
Alfa corporation is an S corporation. Which of the following stateme.pdf
Alfa corporation is an S corporation. Which of the following stateme.pdfAlfa corporation is an S corporation. Which of the following stateme.pdf
Alfa corporation is an S corporation. Which of the following stateme.pdfinfo245627
 
Alex dirige un equipo de varios profesionales. Es consciente de que .pdf
Alex dirige un equipo de varios profesionales. Es consciente de que .pdfAlex dirige un equipo de varios profesionales. Es consciente de que .pdf
Alex dirige un equipo de varios profesionales. Es consciente de que .pdfinfo245627
 
Aceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdf
Aceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdfAceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdf
Aceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdfinfo245627
 

More from info245627 (20)

Activity 1 The role of government in promoting business ethics Disc.pdf
Activity 1 The role of government in promoting business ethics Disc.pdfActivity 1 The role of government in promoting business ethics Disc.pdf
Activity 1 The role of government in promoting business ethics Disc.pdf
 
Ace Inc. has five employees participating in its defined-benefit pen.pdf
Ace Inc. has five employees participating in its defined-benefit pen.pdfAce Inc. has five employees participating in its defined-benefit pen.pdf
Ace Inc. has five employees participating in its defined-benefit pen.pdf
 
Accrued liability for utilities. Account #1 correct Account Type cor.pdf
Accrued liability for utilities. Account #1 correct Account Type cor.pdfAccrued liability for utilities. Account #1 correct Account Type cor.pdf
Accrued liability for utilities. Account #1 correct Account Type cor.pdf
 
Accounting Elements Label each of the following accounts as an Asset.pdf
Accounting Elements Label each of the following accounts as an Asset.pdfAccounting Elements Label each of the following accounts as an Asset.pdf
Accounting Elements Label each of the following accounts as an Asset.pdf
 
Accounts in a company�s general ledger are divided into different ca.pdf
Accounts in a company�s general ledger are divided into different ca.pdfAccounts in a company�s general ledger are divided into different ca.pdf
Accounts in a company�s general ledger are divided into different ca.pdf
 
actuarial science statistics required! Let X be a truncated Poisson .pdf
actuarial science statistics required! Let X be a truncated Poisson .pdfactuarial science statistics required! Let X be a truncated Poisson .pdf
actuarial science statistics required! Let X be a truncated Poisson .pdf
 
Acuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdf
Acuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdfAcuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdf
Acuerdo y desacuerdo entre economistas Suponga que Musashi, un eco.pdf
 
All of the following contributed to a surge in international lending.pdf
All of the following contributed to a surge in international lending.pdfAll of the following contributed to a surge in international lending.pdf
All of the following contributed to a surge in international lending.pdf
 
All of these statements are correct EXCEPT for which of the followin.pdf
All of these statements are correct EXCEPT for which of the followin.pdfAll of these statements are correct EXCEPT for which of the followin.pdf
All of these statements are correct EXCEPT for which of the followin.pdf
 
All of the following statements accurately describe manager�employee.pdf
All of the following statements accurately describe manager�employee.pdfAll of the following statements accurately describe manager�employee.pdf
All of the following statements accurately describe manager�employee.pdf
 
All of the following explain why spending on healthcare in the Unite.pdf
All of the following explain why spending on healthcare in the Unite.pdfAll of the following explain why spending on healthcare in the Unite.pdf
All of the following explain why spending on healthcare in the Unite.pdf
 
Alibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdf
Alibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdfAlibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdf
Alibaba y el comercio electr�nico de China �Open Sesame� se hace re.pdf
 
Ali has a small construction company. During the year, he paid Will .pdf
Ali has a small construction company. During the year, he paid Will .pdfAli has a small construction company. During the year, he paid Will .pdf
Ali has a small construction company. During the year, he paid Will .pdf
 
Algunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdf
Algunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdfAlgunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdf
Algunos pa�ses tienen una larga tradici�n de soborno de funcionarios.pdf
 
Alguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdf
Alguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdfAlguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdf
Alguien podr�a ayudarme con estas preguntas sobre impuestos 1. Ca.pdf
 
Alexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdf
Alexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdfAlexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdf
Alexander es un carpintero de 55 a�os que lleg� a nuestra cl�nica qu.pdf
 
Aggregate demands downward-sloping character reflects three princip.pdf
Aggregate demands downward-sloping character reflects three princip.pdfAggregate demands downward-sloping character reflects three princip.pdf
Aggregate demands downward-sloping character reflects three princip.pdf
 
Alfa corporation is an S corporation. Which of the following stateme.pdf
Alfa corporation is an S corporation. Which of the following stateme.pdfAlfa corporation is an S corporation. Which of the following stateme.pdf
Alfa corporation is an S corporation. Which of the following stateme.pdf
 
Alex dirige un equipo de varios profesionales. Es consciente de que .pdf
Alex dirige un equipo de varios profesionales. Es consciente de que .pdfAlex dirige un equipo de varios profesionales. Es consciente de que .pdf
Alex dirige un equipo de varios profesionales. Es consciente de que .pdf
 
Aceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdf
Aceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdfAceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdf
Aceptaci�n Michael Smith, Judy Olsen, Kristy Johnston y su madre p.pdf
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 

Add an object that flies from left to right, over and over. � The ob.pdf

  • 1. Add an object that flies from left to right, over and over. The object can be simple but should be of your own design. It should use at least three shapes (e.g., the plane in the example uses one rectangle and two triangles). The objects coordinates should be stored globally, because we will need to remember where the object is from one frame to the next. A drawXXXXX() function (where XXXXX is your object) should use the current position of the object to draw the object. The object should be near the top of the canvas. A moveXXXXX() function (where XXXXX is your object) should update the position of the object, using a SPEED constant to determine how much the object should move from one frame to the next. The moveXXXXX() function should make the object wrap, so that once it has gone off the right side of the canvas, it reappears from the left side of the canvas. The object should move completely out of view (off the canvas) before reappearing, and when it reappears, it should appear to emerge from the left side (i.e., you should not see the entire object pop into view: it will gradually fly off the right side of the canvas, then fly onto the canvas from the left side). moveXXXXX() and drawXXXXX() should be called from draw().