Question: Part 3: Orders Order class Instance variables: Make instance variables appropriately to accomplish the tasks you need. Methods init :constructor, initializes instance variables Additional Parameters:

Part 3: Orders Order class Instance variables: Make instance variables appropriately to accomplish the tasks you need. Methods init :constructor, initializes instance variables Additional Parameters: No additional parameters. Note: Just because you don't have any parameters doesn't mean it wouldn't be good to set up your instance variables. You will need to keep track of wheels (and number of wheels) ordered somehow... o o add wheels:: adds some number of wheels to the order o Additional Parameters: wheel and number where number indicates how many wheels of the given wheel type to add to the order Assumptions: o wheel will be an instance of a Wheel " number will be an integer Temporary Assumption (we will fix this later): number will be a positive number above 0 Hint: You probably want to keep a count of the wheels o o remove_wheels : removes all wheels from the order which match the wheel parameter. * o Additional Parameters: wheel (the type of wheel being removed) o Assumption: wheel will be an instance of a Wheel count unique _wheels:returns the number of unique wheels in the order. o Additional Parameters: No additional parameters. count total wheels:: returns the total number of wheels in the order o Additional Parameters: No additional parameters. materials in the order . count_unique materials: returns the number of unique o Additional Parameters: No additional parameters. . count wheels with material: returns the number of wheels in the order with a certain material. o Additional Parameters: material (the type of material the wheel must be made out of) o Assumption: material will be an instance of a Material . get_cost: returns the total cost for the order (in cents) o Additional Parameters: No additional parameters. . str returns string representation with this format: 5 Wheels, cost: $297.16 o o Additional Parameters: No additional parameters. Notes: The quotes in the example are just our string boundaries! The first character in the above example is 5 Number of wheels is a unit (should never be a fraction) and cost is shown with t decimal places. " o Remember: You already wrote methods to get the total cost and the number ofw
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
