Question: Basic python Position =(x,y), Height=h, width =w, Color =c. For example, the default Block would print out as: Position =(10,10), Height =10, Width =20, Color
Basic python
Position =(x,y), Height=h, width =w, Color =c. For example, the default Block would print out as: Position =(10,10), Height =10, Width =20, Color = Black The block should contain the following methods: change_ x (value): adds value to the x position change y (value): adds value to the y position chage_color(color): changes the color to the indicated color Part II Create a separate file that will test your block class. The code should include The instantiation of a default block. The instantiation of a block with a position as parameters (and x and y coord) The instantiation of a block with position, height, and width as parameters. The instantiation of a block with all attributes as parameters. Note: this testing process should inform the order needed for the variables. The code should also include the printing of each instantiated object and changing the locat ( x and y positions) and color of at least one object
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
