Microsoft Word - HW10_Requirements.docx ***ALL CODE MUST BE DONE IN PROCCESSING SOFTWARE FREE SOFTWARE DOWNLOAD ON processing.org*** *** WRITE NOTES EXPLAINING EACH STEP OF THE CODE*** PLEASE SUBMIT A...

1 answer below »
All code must be done in processing software, free software download on processing.orgPlease write notes explaining each step of code


Microsoft Word - HW10_Requirements.docx ***ALL CODE MUST BE DONE IN PROCCESSING SOFTWARE FREE SOFTWARE DOWNLOAD ON processing.org*** *** WRITE NOTES EXPLAINING EACH STEP OF THE CODE*** PLEASE SUBMIT A ZIPPEDFILE of the folder containing 1. Button.pde 2. hw_10_Button_Usage.pde CreateaclasscalledButton: Attributes/properties: 1. x//storesthexcoordinate 2. y//storestheycoordinate 3. buttonWidth// stores the width of the Button 4. buttonHeight //stores the height of the Button 5. caption//aStringtostorethecaptionortextthatneeds tobedisplayed 6. clr//tostorethecoloroftheButton Define2constructors 1. constructor#1:doesnottakeany inputvalues:itshouldinitializethepropertiesin thefollowingway: o xisassignedavaluebasedonrandomvalue between0&width o yisassignedavaluebasedonrandomvalue between0&height o buttonWidthisassignedavalue200, o buttonHeightisassignedavalue100, o captionisassignedavalue"NoCaptionGiven". o clrisassignedavalueofredcolor. 2. constructor#2-takes4floatvalues,aString value&acolorvalueasinputvalues: o theincomingvaluesneedtobestoredinthe appropriateattributes Definethemethodshow: 1. Itdoesnottakeinanyinputvalues 2. Doesnotreturnanyvalue. 3. Goalistodisplayarectanglebasedontheattributes. ThecaptionshouldappearinthemiddleoftheButton andnotontop Intheusagesketch,create4instancesofButtonand makethemappearonthecanvasasshowninthe pictures. insideusagesketch:Pleasedonotwritecodelikethis: rect(width-300,0,300,200,"TOPRIGHT"); refertoBall_usage.pdeinsideBox17_10_20_oops_intro Button #1's specs : it can be anywhere in the canvas and has the default red color & caption on it. Button #2's specs : needs to be near the top right edge of the canvas, and is of size width/3 units by height/5 units ; it should be green in color & have the caption as TOP RIGHT Button #3's specs : needs to be near the bottom left edge of the canvas, is of size as width/4 units by height/5 units; it should be blue in color & have the caption as BOTTOM LEFT Button #4's specs : needs to be near bottom right edge of canvas, is of size as width/2 units by height/5 units ; it should be white in color & have the caption as BOTTOM RIGHT As the various captures of the canvas inside Button_screen_captures.pdf (found in Box - under hw10 folder) shows, Button 1 can appear anywhere but other Buttons should appear where they are appearing.
Answered 1 days AfterNov 02, 2021

Answer To: Microsoft Word - HW10_Requirements.docx ***ALL CODE MUST BE DONE IN PROCCESSING SOFTWARE FREE...

Sathishkumar answered on Nov 04 2021
127 Votes
class Button
{
PVector Pos=new PVector(0, 0);
float Width=0;
float Height=0;
color Colo
ur;
String Text;
//constructor;
Button (int x, int y, int w, int h, String t, int r, int g, int b)
{
Pos.x=x;
Pos.y=y;
Width=w;
Height=h;
Colour= color(r,b,g);
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here