-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDriver.java
More file actions
28 lines (23 loc) · 820 Bytes
/
Driver.java
File metadata and controls
28 lines (23 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package decorator;
/**
* Main Class
* @author Khalid Elshafie
* @created 9/17/17
*/
public class Driver {
public static void main(String[] args) {
Sandwich basicSandwich = new Shatta(new Fool(new Salt(new BasicSandwich())));
System.out.printf("Description: %s%n", basicSandwich.getDescription());
System.out.printf("Cost: %.2f", basicSandwich.getCost());
//
/**
* حاول تعلم المثال دة لو داير
* Car Options System
* Car: Interface
* BasicCar: Concrete Implementaion
* CarDecorator: Abstract Decorator
* Options: Navigation system, DVD Player ... etc (Decoroate as you wish :D)
* Use the form to discuss the code if you have any issues: http://javaway.abolkog.com
*/
}
}