Peggy Fisher shows how she approached solving a data concatenation requirement. Learn how she uses Scala to accomplish her goal.
- [Instructor] How did you make out with your challenge?…I hope you were successful…and you had some fun along the way.…Let me show you how I would approach this problem.…I'm going to use the worksheet within the Scala IDE.…So I'm going to go ahead and start by creating a case class.…When you create a case class, one thing to keep in mind…is the word case and the word class are both lowercase.…And I want to call my case class Employee.…And the Employee is going to have three values,…the last name, and it's going to be a String comma,…the first name, and it's going to be a String,…and then the Employee ID.…
So I'll Just call it ID and make this an integer.…Now you might have used different names,…but I just used lName, fName, and ID.…Okay, now let's go ahead and inside the body of my class,…really the only thing that I want to do for this example…is to override the toString.…So I'm going to use the keyword override def toString,…and it's going to return a string.…And I'm going to set that equal to…and now I'm going to print out the words…
- Installing Scala
- Integrating with IDEs
- Creating variables
- Using special functions
- Basic types and operations
- Tuples, sets, maps, arrays, and lists
- Classes, fields, and methods
- Singleton objects
Skill Level Intermediate
1. Why Scala?
2. Scala Basics
3. More Scala Basics
4. Objects with Scala
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.