Question: Object Oriented Programming Create a class called Colour. It will use rgb values that will default to 0 , 0 , 0 . Besides the

Object Oriented Programming
Create a class called Colour.
It will use rgb values that will default to 0,0,0.
Besides the constructor, write the following methods:
repr
should allow the colour to be printed like this Colour (213,145,87)
mod_red which takes a factor to add to r value
this factor may be positive or negative and will be added to the r value
make sure that this takes into account that r value must be in the range 0-255
override the addition ') operator
takes another colour (make sure of that it is a colour) and adds the r,g,b values of the two colours
make sure that this takes into account that r,g,b values must be in the range 0-255
 Object Oriented Programming Create a class called Colour. It will use

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!