Advertisement
Guest User

Untitled

a guest
Oct 18th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. // Generic Car class
  2. class Car {
  3. Engine engine;
  4. Wheels wheels;
  5.  
  6. // Car class relies on concrete Engine and Wheels object before instantiation
  7. Car(Engine engine, Wheels wheels) {
  8. this.engine = new Engine();
  9. this.wheels = new Wheels();
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement