Getting Users’ Input

We’ll build an application that takes a list of stock ticker symbols along with the units of stock users hold and provides to them the total value of their investments as of the current date. This involves several things: getting users’ input, reading files, parsing data, writing to files, fetching data from the web, and displaying information to users.

We’re going to first develop the different parts of the application separately to get a good grasp of the parts individually. Then we’ll put them together to create the application. Let’s get started.

As a first step, we want to know the ticker symbols and units of each stock for which the application should find the values. Scala’s StdIn class can help to get input from ...

Get Pragmatic Scala now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.