Completed super demonstration #3

Merged
JMR-dev merged 11 commits from jr-displayclasses into main 2022-07-12 21:27:30 +00:00
JMR-dev commented 2022-07-12 15:23:43 +00:00 (Migrated from github.com)
  • saving added classes : '
  • saving further inheiritance work
  • saving work on further inheritance practice
  • saving progress on implementing abstracted methods
  • plop
  • saving demonstrating super call 1 level up
  • saving 1st chained super call
  • added in additional inherited parameters (I think all of them?)'
  • created notes file and .gitignore
  • saving work on adding attributes to instance
  • saving functional display of super(), ready for review
- saving added classes : ' - saving further inheiritance work - saving work on further inheritance practice - saving progress on implementing abstracted methods - plop - saving demonstrating super call 1 level up - saving 1st chained super call - added in additional inherited parameters (I think all of them?)' - created notes file and .gitignore - saving work on adding attributes to instance - saving functional display of super(), ready for review
JMR-dev commented 2022-07-12 15:52:22 +00:00 (Migrated from github.com)

Tommy's comment
Your semi_Truck example here looks good! A couple quick notes that are more "design" related than anything.

semi_Truck, RoadVehicle, or GroundVehicle shouldn't really need to take in a travel medium (I think?). All ground vehicles would by nature have travel medium = "Ground", so GroundVehicle can make that assumption when calling the base Vehicle constructor

Similarly, semi_Truck shouldn't need to take in a vehicle type as it'll always be "Semi Truck". Instead of taking it in as a parameter in your constructor, you can just pass "Semi Truck" into the RoadVehicle constructor in the semi_Truck.init method

Tommy's comment Your semi_Truck example here looks good! A couple quick notes that are more "design" related than anything. semi_Truck, RoadVehicle, or GroundVehicle shouldn't really need to take in a travel medium (I think?). All ground vehicles would by nature have travel medium = "Ground", so GroundVehicle can make that assumption when calling the base Vehicle constructor Similarly, semi_Truck shouldn't need to take in a vehicle type as it'll always be "Semi Truck". Instead of taking it in as a parameter in your constructor, you can just pass "Semi Truck" into the RoadVehicle constructor in the semi_Truck.init method
JMR-dev commented 2022-07-12 15:53:06 +00:00 (Migrated from github.com)

Train just needs Drive() to be done as far as I have designed, and then Fleet needs to have some of its redundant attributes removed that were added before I started designing anything. These will be implemented in the next PR.

Train just needs Drive() to be done as far as I have designed, and then Fleet needs to have some of its redundant attributes removed that were added before I started designing anything. These will be implemented in the next PR.
JMR-dev commented 2022-07-12 20:09:05 +00:00 (Migrated from github.com)

Make sure to implement abstracted methods

Make sure to implement abstracted methods
This repo is archived. You cannot comment on pull requests.