1
00:00:00,360 --> 00:00:01,050
Hello again.

2
00:00:01,050 --> 00:00:08,070
In this video, I'll show you my solution to the Spa hotel booking program to show you what I added.

3
00:00:08,100 --> 00:00:15,810
What I'll do is I'll select the original program we have been building today and the program which I

4
00:00:15,810 --> 00:00:16,560
extended.

5
00:00:16,560 --> 00:00:17,940
So Main is a program.

6
00:00:17,940 --> 00:00:24,060
I extend it and Main original is the program we've been working on in the previous videos and I'll go

7
00:00:24,060 --> 00:00:25,470
to compare files.

8
00:00:26,820 --> 00:00:31,260
And so here on the left you see my changes are highlighted.

9
00:00:31,470 --> 00:00:34,620
So up to here we don't have any change.

10
00:00:34,620 --> 00:00:36,390
The two programs are the same.

11
00:00:36,390 --> 00:00:42,120
But then I added this spa hotel class which inherits from the hotel class.

12
00:00:42,120 --> 00:00:43,830
So that's one addition.

13
00:00:45,860 --> 00:00:47,030
We go down.

14
00:00:47,030 --> 00:00:49,580
The credit card classes are the same.

15
00:00:49,580 --> 00:00:52,120
Secure credit card is also the same.

16
00:00:52,130 --> 00:00:55,340
Then I added a spot ticket class.

17
00:00:56,680 --> 00:00:58,300
Which looks like this.

18
00:00:58,420 --> 00:01:05,680
A Spar ticket class is very similar to the reservation ticket class, which we have up here.

19
00:01:06,280 --> 00:01:12,640
However, the generate method is different, so it does have different content.

20
00:01:15,060 --> 00:01:20,790
And then in here I changed from hotel to Spa Hotel.

21
00:01:20,790 --> 00:01:24,150
So now I'm using spa hotel instances.

22
00:01:26,420 --> 00:01:32,700
And then down here, once we print the reservation tickets using the generate method.

23
00:01:32,720 --> 00:01:35,140
So this is the hotel, the reservation ticket.

24
00:01:35,150 --> 00:01:41,540
Then I ask the customers if they want to book a spot package using an input function.

25
00:01:41,840 --> 00:01:50,600
And then if the answer is yes, I book that package using the book spot package method of the Spa Hotel

26
00:01:50,600 --> 00:01:51,590
instance.

27
00:01:51,590 --> 00:01:59,390
So that's the instance we created in here, Spa Hotel, which does have this book spa package method.

28
00:01:59,420 --> 00:02:02,930
And then I instantiate Spa Ticket.

29
00:02:04,210 --> 00:02:10,780
In here using customer name, the name which the customer gave appear when we ask them.

30
00:02:11,140 --> 00:02:16,060
So here and the hotel object is the same spa hotel instance.

31
00:02:16,180 --> 00:02:24,310
Then I call the spot ticket generates methods and that will print out the methods on the command line.

32
00:02:25,330 --> 00:02:30,100
And that's all the changes I added to my program.

33
00:02:30,820 --> 00:02:33,880
Now, perhaps your version is different.

34
00:02:33,910 --> 00:02:40,630
It's a good idea that you add child classes just off to the parent classes.

35
00:02:40,630 --> 00:02:47,620
So hotel classes here, spousal classes there instead of adding spa hotel at the end here.

36
00:02:47,800 --> 00:02:49,900
So this makes more sense.

37
00:02:50,130 --> 00:02:51,150
Anyhow, that's it.

38
00:02:51,160 --> 00:02:52,300
And thanks a lot.

39
00:02:52,330 --> 00:02:52,780
See you.

