SHARE
TWEET

Untitled

a guest Oct 18th, 2019 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top