1
00:00:00,530 --> 00:00:01,290
Welcome.

2
00:00:01,310 --> 00:00:04,580
In this video, I'll give you the task for today's project.

3
00:00:04,880 --> 00:00:11,510
The task will consist of extending the hotel reservation app we've been working on today.

4
00:00:11,960 --> 00:00:16,460
The finished code should make the program behave like this.

5
00:00:16,460 --> 00:00:20,130
So let me demonstrate you the finished version of the program.

6
00:00:20,150 --> 00:00:27,710
Again, the program as before, should output the data frame first showing the list of hotels, then

7
00:00:27,710 --> 00:00:28,750
as before.

8
00:00:28,760 --> 00:00:35,060
Also here, you can enter the ID of the hotel like 188 for this particular hotel.

9
00:00:35,270 --> 00:00:38,600
Press enter and zero name as before.

10
00:00:38,600 --> 00:00:39,830
So no changes.

11
00:00:39,830 --> 00:00:47,210
So for press enter, we get the booking ticket, the reservation ticket printed out.

12
00:00:47,480 --> 00:00:54,920
But then the change this time for your task is that you want to ask the users if they want to book a

13
00:00:54,920 --> 00:00:56,360
spa package.

14
00:00:56,540 --> 00:00:57,170
All right.

15
00:00:57,560 --> 00:01:00,320
So now we're talking about spa hotels.

16
00:01:00,320 --> 00:01:04,819
As this far we only had hotel classes.

17
00:01:04,819 --> 00:01:05,300
Right.

18
00:01:05,300 --> 00:01:07,670
So but let me talk about that in a minute.

19
00:01:08,210 --> 00:01:11,690
So here the user can enter, yes or no?

20
00:01:11,720 --> 00:01:13,430
If they enter, Yes.

21
00:01:14,620 --> 00:01:16,180
This will be printed out.

22
00:01:16,180 --> 00:01:21,040
So that's a new spa reservation ticket, right?

23
00:01:21,070 --> 00:01:23,280
Thank you for your spa reservation here.

24
00:01:23,380 --> 00:01:23,650
Spa.

25
00:01:23,680 --> 00:01:27,550
Booking data or dates, which is the same name as before.

26
00:01:27,970 --> 00:01:33,160
Hotel name is the same hotel that we have booked in the first step here.

27
00:01:33,160 --> 00:01:33,820
Right.

28
00:01:34,270 --> 00:01:36,390
So that's the new feature.

29
00:01:36,400 --> 00:01:43,930
The new feature, as you can see, allows users to book a package from a spa hotel.

30
00:01:44,020 --> 00:01:49,280
So as you can imagine, your duty is to add a new class.

31
00:01:49,300 --> 00:01:57,580
So far, we had a hotel class which represents any hotel instance, but now we have this more specific

32
00:01:57,580 --> 00:02:05,740
class spa hotel, which is a hotel, but it does have perhaps a new method, which should be something

33
00:02:05,740 --> 00:02:07,770
like books package.

34
00:02:07,780 --> 00:02:10,990
And in that method you can just write a pass statement.

35
00:02:10,990 --> 00:02:13,420
So you don't really need to implement that method.

36
00:02:13,450 --> 00:02:20,020
So that's one point of your task creating this spa hotel class which inherits from hotel.

37
00:02:20,050 --> 00:02:28,840
The second task is to create a new class, maybe name that spa ticket or spa reservation ticket.

38
00:02:28,840 --> 00:02:30,190
But be careful here.

39
00:02:30,310 --> 00:02:35,920
This class shouldn't really inherit from the reservation ticket class.

40
00:02:36,220 --> 00:02:42,160
That's because a spa reservation is not a hotel reservation.

41
00:02:42,160 --> 00:02:43,000
Right.

42
00:02:43,270 --> 00:02:48,370
So you should always ask this question when you want to decide if you want to inherit or not.

43
00:02:48,820 --> 00:02:51,490
Is the child the parent?

44
00:02:51,520 --> 00:02:57,610
In this case, it is not because the reservation ticket class, which we already have in the code,

45
00:02:57,640 --> 00:03:02,380
is designed for hotels, not for spa bookings.

46
00:03:02,380 --> 00:03:10,300
So sometimes you have to create new classes from scratch and rewrite perhaps a generate method for your

47
00:03:10,300 --> 00:03:12,550
new spa ticket class.

48
00:03:13,090 --> 00:03:17,830
And then in the program, main loop, you need to update your classes.

49
00:03:17,830 --> 00:03:23,350
So instead of creating hotel instances, you want to create spa hotel instances.

50
00:03:23,350 --> 00:03:29,750
And then you also want to add this question after you generate the hotel ticket.

51
00:03:29,770 --> 00:03:31,840
You want to ask the user if they want to enter.

52
00:03:31,840 --> 00:03:32,310
Yes.

53
00:03:32,320 --> 00:03:37,210
If yes, then perhaps instantiate the new spa ticket class.

54
00:03:37,210 --> 00:03:38,810
So that's the idea.

55
00:03:38,830 --> 00:03:42,250
I hope you get it right and I'll give you the solution in the next video.

56
00:03:42,250 --> 00:03:42,580
Thanks.

