This video explains a challenge to create a bank account program in Scala. The challenge includes creating a bank account class and a singleton object that is used to keep track of the next account number to be assigned.
- [Instructor] Are you ready for the last challenge…in this series?…In this challenge, we're going to start…by creating a new project in your Scala IDE…then we're going to add a Scala app.…What I'd like you to do is inside that app,…I want you to add a class to create a bank account.…The bank account will include the client name,…the starting balance and the account type,…checking or savings.…Then, use a singleton for the account number,…start it at 5000.…In the main program,…create several instances of bank accounts…and print out your results.…
It might be helpful to go back to the video on classes…where I created a payroll app.…The bank account app is going to be very similar to that.…I'm estimating this challenge will take…about 15 minutes so go ahead and give it a try and have fun.…
Author
Released
5/19/2017Join 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
Skill Level Intermediate
Duration
Views
Related Courses
-
Learning Scala Web Development
with Andriy Redko2h 11m Beginner -
Java 8 Essential Training
with David Gassner6h 4m Beginner -
Java Platforms Compared: SE vs EE vs ME
with Peggy Fisher25m 38s Intermediate -
Scala First Look
with Peggy Fisher2h 46m Intermediate -
Scala Essential Training for Data Science
with Dan Sullivan1h 51m Intermediate
-
Introduction
-
1. Getting Started with Scala
-
Learn about Scala3m 39s
-
How to install Scala4m 28s
-
What is a Scala worksheet?5m 34s
-
Challenge: Worksheet1m 11s
-
Solution: Worksheet4m 2s
-
-
2. Scala Basics
-
What is type inference7m 27s
-
How to define functions in Scala11m 34s
-
Scala operators7m 31s
-
Decision statements in Scala8m 40s
-
Challenge: Payroll1m 14s
-
Solution: Payroll5m 28s
-
-
3. More Scala Basics
-
How to read files in Scala6m 54s
-
Pattern matching4m 58s
-
Sets in Scala5m 32s
-
How to create maps in Scala4m 44s
-
What are tuples?7m 21s
-
Scala lists4m 41s
-
Solution: Arrays6m 16s
-
4. Objects with Scala
-
Singleton objects2m 56s
-
Case classes2m 49s
-
Solution: Bank account6m 51s
-
Conclusion
-
Next steps30s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Challenge: Bank account