Join Peggy Fisher for an in-depth discussion in this video How to use the exercise files, part of Scala Essential Training.
- [Instructor] This course is accompanied by exercise files that you can use to follow along with the demonstrations that I perform on the screen. I've copied the exercise files folder to my desktop for easy access. But you can place them anywhere. Now I want to show you how the files and folders are set up for this course. There's a folder for each movie that contains an exercise file. Inside the folder that corresponds with the movie, I am including a copy of the file that you see at the beginning of the lesson if there is one. Note if the activity in the video creates a new project, there will be no starting file in this folder.
But all folders contain another folder labeled final. This is the finished version of the file for each activity that I use in this course. These files are available as a reference. Let's take a look at an example. If I open up the exercise files folder, you can see there's chapter 01. In chapter 01, each of these sections, 04, 05, 06, and 08 have an exercise file inside. If I click on 01_04, you can see the finished version of the file from the movie.
These files are just for convenience. They're not required. But they just might make things a little easier when you're following along or if you want to go back and look at some code that we worked on in the movie. When working with one of the exercise files, you're going to want to import that into your Scala IDE. In order to do that, you first have to make a new project. So here, I'm going to do file, new, Scala project. And I'm going to call it HelloWorld. And I'll click finish.
If I expand the project in the left hand side in the package explorer, and if I right-click on the src folder, I can say import under general, I can find file system. I can click next. I can browse. Up to my exercise files. Chapter 01, 01_04, final, for example. Click OK.
And I'm going to import the HelloWorld.scala. Then I'm going to click finish. Now, if I expand the src folder and I open up the default package, here's my HelloWorld.scala program.
Join Peggy Fisher as she helps get you started with Scala, so you can leverage the unique capabilities it offers. First, learn the basics of type inference, variables, loops, functions, and operators. Then, find out how to read files using a console, perform pattern matching, handle exceptions, and more. Finally, learn how to use classes, fields, methods, and objects.
- Integrating with IDEs
- Scala worksheets
- Scala repl sessions
- Type inference
- Creating variables
- Working with loops
- Higher-order functions
- Scala operators
- Working with decision statements
- Handling exceptions using try or catch
- Working with tuples and arrays
- Classes, fields, and methods