From the course: Build Spring Boot Apps with the Kotlin Programming Language
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Solution walk-through
From the course: Build Spring Boot Apps with the Kotlin Programming Language
Solution walk-through
- [Instructor] Okay well I hope you have had a go at that. I'm going to now code this up, and I think we'll start by creating a mutable list of states that we can then convert into the immutable list. So let's put up here our mutable list of states and I don't really want this variable to be visible outside of this class, so I think we'll make it a private variable, and I'm going to I think call it hiddenSeats. Meaning that this is the list of seats but it's going to be hidden from outside of this class, and that's going to be a mutable list of and it's objects of type seat. Now we'll obviously need to fill in what those hidden seats are but it does then mean that for our seats variable we can set that equal to hiddenSeats.list, actually the way we'll do it is say, there's a val called seats and its get is hiddenSeats.list. Okay so because of that then, what we'll need to do is to ensure that we can complete all the data that's going to go into our hidden seats and the sensible thing…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
(Locked)
Project structure and packages2m 5s
-
(Locked)
The class declaration and class-level attributes3m 31s
-
Instantiating a class and accessing class-level attributes2m 14s
-
(Locked)
Creating a simple constructor5m 7s
-
(Locked)
Secondary constructors5m 20s
-
(Locked)
Alternative class design5m 3s
-
(Locked)
Overriding getters and setters7m 21s
-
(Locked)
Functions within a class2m 57s
-
(Locked)
Static functions3m 28s
-
(Locked)
Data classes7m 32s
-
(Locked)
-
-
(Locked)
Creating a project with the Spring Initializr4m 30s
-
(Locked)
A hello world controller3m 33s
-
(Locked)
Auto-restarting an application4m 18s
-
(Locked)
Overview of the case study1m 42s
-
(Locked)
Creating views and backing beans5m 15s
-
Connecting views to controller functions2m 10s
-
(Locked)
Adding services4m 13s
-
(Locked)
Posting to a controller5m 3s
-
(Locked)
Dependency injection6m 38s
-
(Locked)
Revisiting backing beans3m 32s
-
(Locked)
-
-
(Locked)
Functional programming overview4m 57s
-
(Locked)
Methods that take function parameters—the Java way5m 17s
-
(Locked)
Methods that take function parameters—the Kotlin way5m 19s
-
(Locked)
Functional programming with lists6m 48s
-
(Locked)
filter and flatMap3m 46s
-
(Locked)
reduce and fold6m 33s
-
(Locked)
Working with maps3m 14s
-
(Locked)
-
-
(Locked)
Step 1: Explaining the challenge4m 9s
-
(Locked)
Solution walk-through2m 33s
-
(Locked)
Mappings between entities7m 33s
-
(Locked)
Upgrading the view11m 25s
-
(Locked)
Step 2: Explaining the challenge2m 26s
-
(Locked)
Solution walk-through9m 4s
-
(Locked)
Step 3: Explaining the challenge3m 21s
-
(Locked)
Solution walk-through4m 21s
-
(Locked)