-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHouse.java
63 lines (54 loc) · 1.36 KB
/
House.java
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* Abstract class House which contains all the methods for making a house. Class is abstract so createFrame() can be completed by its children.
* @author Nick Bautista
*
*/
public abstract class House {
/**
* Calls all the methods needed to build a house at once when called.
*/
public void buildHouse() {
this.prepFoundation();
this.createFrame();
this.installDrywall();
this.addWindows();
this.addElectrical();
this.addPlumbing();
}
/**
* Prints foundation preparation message.
*/
public void prepFoundation() {
System.out.println("Foundation: Adding a crawlspace, and a strong backbone.");
}
/**
* Prints frame creation message.
*/
public void createFrame() {
System.out.print("Framing: Adding the ");
}
/**
* Prints drywall installation message.
*/
public void installDrywall() {
System.out.println("Drywall: Creating the interior walls.");
}
/**
* Prints window installation message.
*/
public void addWindows() {
System.out.println("Windows: Putting in the glass for the windows.");
}
/**
* Prints electrical installation message.
*/
public void addElectrical() {
System.out.println("Electrical: Running all the wires and hooking up the power.");
}
/**
* Prints plumbing message.
*/
public void addPlumbing() {
System.out.println("Plumbing: Letting water run throug the house.");
}
}