UDC Advanced Applied Programming its an assignment about Advanced Applied Programming , i attached the pdf file its has the steps for the assignment . plea

UDC Advanced Applied Programming its an assignment about Advanced Applied Programming , i attached the pdf file its has the steps for the assignment . please make sure u following the step in the pdf file that is the main idea . After completing Scala-Setup, submit a zip file.The zip file must include three files such as (1) ScalaIDE.png, (2) ScalaSbt.png, (3) HelloWorld.html.Each file – 5pt. Zip file must be named as YourStudentID_Assignment01.zip (5pt)For instance, if your student ID is N012345, the name of the zip file must be N012345_Assignment01.zip.i will give u my student ID Setup Scala Programming Environment
Dept. of Computer Science and Information Technology
Prerequisites

Necessary Installations

Java 8 JDK (Java SE Development Kit 1.8)


NOTE: Current Scala 2.12.x does not work 100% with JAVA SE 9 or
10
http://www.oracle.com/technetwork/java/javase/downloads/jdk8downloads-2133151.html
check
For Mac OS/X
For Windows
Prerequisites

Necessary Installations

Scala 2.12.x + (for Scala
programming)


NOTE: For compatibility
issue, it is recommend for
you to use Scala version
2.12.8 (latest version Jan.,
2019)
https://www.scalalang.org/download/
For Windows
For MacOS/X
Using IDE for Scala Programming

Installing an IDE

IntelliJ

Install Community edition


Eclipse


https://www.jetbrains.com/idea/
https://www.eclipse.org/
In our lecture, we use IntelliJ IDE application.
Scala IDE setup with IntelliJ
Download & Install IntellJ IDEA Community Edition
1.
1.
2.
https://www.jetbrains.com/idea/
You do not need to change any options. Simply click “Next”
After installation, launch it.
When prompted “Import IntelliJ IDEA settings from:”?
2.
3.
1.
Select “Do not import settings”.
Scala IDE setup with IntelliJ (Cont’d)
1.
2.
3.
When asked, accept “Privacy Policy”.
In the UI theme page, select UI theme based on your
preference.
In the page “Tune IDEA to your tasks”, simply click
“Next: Featured plugins”
Scala IDE setup with IntelliJ (Cont’d)
1.
In the page “Download featured plugins”, click “install”
to install Scala plugin.
Scala IDE setup with IntelliJ (Cont’d)

After installation done, click “Start using IntelliJ IDEA”.
Scala project using IntelliJ IDE with the
Scala plugin
IntelliJ IDE with the Scala plugin

Create New Project

Select “Create New Project”
IntelliJ IDE with the Scala plugin (Cont’d)

Select “Scala” and “IDEA”. Then, click the “Next” button.

If you do not see “Scala” in the left pane, you need to go back
to the previous slide and change configuration.
IntelliJ IDE with the Scala plugin (Cont’d)

Add project name (“HelloWord”).
IntelliJ IDE with the Scala plugin (Cont’d)

If JDK is not selected, select JDK location by clicking the
“New…” button.
IntelliJ IDE with the Scala plugin (Cont’d)

Assuming this is your first time creating a Scala project
with IntelliJ, you’ll need to install a Scala SDK. To the
right of the Scala SDK field, click the “Create…” button.
IntelliJ IDE with the Scala plugin (Cont’d)

The installed Scala 2.12.x
will be appeared. Simply
click the OK button.

CAUTION: If you cannot
find the Scala, you need to
download it by clicking
the “Download…” button.
IntelliJ IDE with the Scala plugin (Cont’d)

Click the “Finish” button.
IntelliJ IDE with the Scala plugin (Cont’d)

On the Project pane on the left, right-click src and select
New => Scala class.
IntelliJ IDE with the Scala plugin (Cont’d)

Name the class Hello and change the Kind to object. Then,
click the “OK” button.
IntelliJ IDE with the Scala plugin (Cont’d)

Change the code in the class to the following:
object Hello extends App {
println(“Hello, World!”)
}
IntelliJ IDE with the Scala plugin (Cont’d)

Right click on Hello in
your code and select Run
‘Hello’.
Submission

Capture the screen and save it as ScalaIDE.png.
Result
Build a Scala project using sbt
Build a Scala project using sbt

What is sbt?


sbt is a popular tool for compiling, running, and testing Scala
projects of any size.
Using a build tool such as sbt (or Maven/Gradle) becomes
essential once you create projects with dependencies or more
than one code file.
Build a Scala project using sbt (Cont.)

On the left panel, select Scala and on the right panel,
select sbt. Then, click the “Next” button.
Build a Scala project using sbt (Cont.)


Name the project “sbtExample”.
Make sure the JDK , sbt, and Scala are set. Then, click the
“Finish” button.
Build a Scala project using sbt (Cont.)

Understanding the directory structure

sbt creates many directories which can be useful once you start
building more complex projects.
Build a Scala project using sbt (Cont.)

Right click on your project, “Add Framework support”
and choose Scala framework.
Build a Scala project using sbt (Cont.)



For writing Scala code
On the Project panel on the left, expand sbtExample =>
src => main
Right-click scala and select New => Package
Build a Scala project using sbt (Cont.)

Name the package example and click OK.
Build a Scala project using sbt (Cont.)

Right-click the package example and select New =>
Scala class.
Build a Scala project using sbt (Cont.)

Name the class Main and change the Kind to object.
Build a Scala project using sbt (Cont.)

Change the code in the class to the following:
object Main extends App {
val ages = Seq(42, 75, 29, 64)
println(s”The oldest person is ${ages.max}”)
}
Build a Scala project using sbt (Cont.)


To run the Scala program,
First select Edit configurations from the Run menu
Build a Scala project using sbt (Cont.)

Click the + button and
select SBT Task.
Build a Scala project using sbt (Cont.)

Name it Run the program.
Build a Scala project using sbt (Cont.)

In the Tasks field, type ~run. Then, click the “OK” button.

The ~ causes SBT to rebuild and rerun the project when you
save changes to a file in the project.
Build a Scala project using sbt (Cont.)


On the Run menu. Click Run ‘Run the program’.
Then, you will see the program is compiled and ran.
Submission

Capture the screen and save it as ScalaSbt.png.
Make sure you have the source code.
Make sure you have the result
with no error..
Web-based Scala programming
databricks



It provides clusters that run on top of AWS and adds a
convenience of having a Notebook System already set up
and the ability to quickly add files.
https://databricks.com/try-databricks
Sign-up to create an account in the Community Edition
databricks

Cloud-optimized Apache
Spark clusters

databricks platform – free
trial (14 days)


Support full features
Community edition



http://community.cloud.datab
ricks.com
6 GB single cluster (no
worker nodes)
It also has its own storage
format known as DBFS.
Choose This
databricks

Login to the Community
edition.

http://community.cloud.data
bricks.com
Community edition
Log-in page
Create a cluster

First, we need
to create a
cluster
Create a cluster (Cont.)


After adding
information
“MyScalaCluster”
in the field of
Cluster Name,
click the “Create
Cluster” button.
You do not need to
change anything
else.
Create a cluster (Cont.)


It takes a while of creating a cluster. When the setting is
completed, the state message will be appeared as “Pending”.
Wait a couple of minutes!! Then, “Pending” message will be
changed to “Running”.
Create a Notebook

Click
“databricks” and
create a New
Notebook
Create a Notebook (Cont.)



Add Name (“HelloWorld”)
Select Language as Scala
Then, click the “Create” button.
Create a Notebook (Cont.)

After adding some Scala codes, run it by pressing “Shift +
Enter”.
Submission

Export your work as HTML file. Then, an HTML file
(“HelloWorld.html”) is created and downloaded
automatically.
Submission Guideline

Submit all three files as a zip file.





ScalaIDE.png
ScalaSbt.png
HelloWorld.html
Zip file must be named as
YourStudentID_Assignment01.zip
For instance, if your student ID is N012345, the zip file
name must be N012345_Assignment01.zip
Q&A

Purchase answer to see full
attachment

"Order a similar paper and get 100% plagiarism free, professional written paper now!"

Order Now