Hello again.
In this video, I'll show you my solution to the Spa hotel booking program to show you what I added.
What I'll do is I'll select the original program we have been building today and the program which I
extended.
So Main is a program.
I extend it and Main original is the program we've been working on in the previous videos and I'll go
to compare files.
And so here on the left you see my changes are highlighted.
So up to here we don't have any change.
The two programs are the same.
But then I added this spa hotel class which inherits from the hotel class.
So that's one addition.
We go down.
The credit card classes are the same.
Secure credit card is also the same.
Then I added a spot ticket class.
Which looks like this.
A Spar ticket class is very similar to the reservation ticket class, which we have up here.
However, the generate method is different, so it does have different content.
And then in here I changed from hotel to Spa Hotel.
So now I'm using spa hotel instances.
And then down here, once we print the reservation tickets using the generate method.
So this is the hotel, the reservation ticket.
Then I ask the customers if they want to book a spot package using an input function.
And then if the answer is yes, I book that package using the book spot package method of the Spa Hotel
instance.
So that's the instance we created in here, Spa Hotel, which does have this book spa package method.
And then I instantiate Spa Ticket.
In here using customer name, the name which the customer gave appear when we ask them.
So here and the hotel object is the same spa hotel instance.
Then I call the spot ticket generates methods and that will print out the methods on the command line.
And that's all the changes I added to my program.
Now, perhaps your version is different.
It's a good idea that you add child classes just off to the parent classes.
So hotel classes here, spousal classes there instead of adding spa hotel at the end here.
So this makes more sense.
Anyhow, that's it.
And thanks a lot.
See you.