Question: Python3 Code Help Please!!! Test Cases: Material class: Instance variables: Make instance variables appropriately to accomplish the tasks you need Methods .init_constructor, initializes instance variables

Python3 Code Help Please!!!

Python3 Code Help Please!!! Test Cases: Material class: Instance variables: Make instance

Test Cases:

variables appropriately to accomplish the tasks you need Methods .init_constructor, initializes instance

variables Additional Parameters: cost and name (in that order) Assumptions: o o

Material class: Instance variables: Make instance variables appropriately to accomplish the tasks you need Methods .init_constructor, initializes instance variables Additional Parameters: cost and name (in that order) Assumptions: o o cost will be an integer indicating the cost of one cubic centimeter of material name will be a string .get_cost : returns the cost of some number of cubic centimeters of material in cents o o Additional Parameter: num_units Assumption: num_units will be an integer representing the number of cubic centimeters of material needed o Temporary Assumption (we will fix this later): num units will never be negative ._str_: returns string representation with this format: "Silver (cost per cm 3: $0.76) 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 s. -Silver in the above example is the material's name. This method reports the cost in dollars (NOT in cents) and dollars are represented with 2 decimal places. _eq_ :: returns true or false depending on whether the current instance (self) s equal to some other instance (other). Two materials are equal if they have the same name and cost. o Parameters:_eq requires the parameters self and other (in that order) Assumption: other will always be an instance of a Material o

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!