Advanced Applied Programming its an assignment about Advanced Applied Programming please see the pdf file that i attach it has all information about the as
Advanced Applied Programming its an assignment about Advanced Applied Programming please see the pdf file that i attach it has all information about the assignment please make sure u following the requirements . THANKS i will give u my last name and my ID number latter as the requirements said Title: Text analyzer
Write a Scala sbt program with IntelliJ. It analyzes user entered sentences or phrases. First, you need to prompt the
user to enter sentences or phrases. After receiving the user’s input, your program needs to analyze the entered
sentences or phrases by determining (1) total # of alphabets, (2) # of words, (3) # of digits, (4) # of special characters,
and (5) # of white spaces.
(1) Prompt the user to enter sentences or phrases of their choosing. Once the user enters, the entered input sentences
or phrases need to be printed out on screen.
Ex:
Enter a sentence or phrase: The only thing we have to fear is fear itself.
You entered: The only thing we have to fear is fear itself.
NOTE: The bold text indicates the user entered sentence.
(2) Analyze the entered sentences or phrases. You can simply use Scala char member methods to check how many
digits, alphabets, words, white spaces, and special characters in the entered sentences or phrases (see HINT for
more).
(3) After analyzing, print output the analyzed result as shown below.
Ex:
Enter a sentence or phrase: This is a test! We do know if 1 + 3 = 40 is incorrect.
You entered: This is a test! We do know if 1 + 3 = 40 is incorrect.
Number of alphabets: 32
Number of words: 15
Number of digits: 4
Number of white space characters: 17
Number of special characters: 4
NOTE: The bold text indicates the user entered sentence.
NAMING REQUIREMENTS:
• Your IntelliJ project should be named as “YourLastname_Assignment02”.
• Your Scala source code must be named as “YourLastname_Assignment02.scala”. When compiled
successfully (with no compilation error), IntelliJ generates the file “YourLastname_Assignment02.jar”.
• You need to zip two files (YourLastname_Assignment02.scala and YourLastname_Assignment02.jar) as
“YourStudentID_Assignment02.zip”. For instance, if your student ID is N012345, the zip file name must
be N012345_Assignment02.zip. Submit the zip file to the Blackboard.
HINTS:
• For creating a Scale program, you can reference Lecture 3 material.
• In your program, you must create an object named as “YourLastname_Assignment02”. Inside of the object,
you need to create a main method as “def main(args: Array[String])”.
• For reading input from the user (through console input), you need to use readLine(). Reference the slide 45
in Lecture 03. To use readLine(), you must import package “scala.io.StdIn.readLine”.
• For counting characters, you need to process the entered input string one character at a time. Reference the
slide 29 in Lecture 03.
• Special character does not belong to any of the character types such as alphabet, digits, and white space.
•
•
To determine the # of words, you need to separate each word by white space(s). Please note that multiple
white spaces need to be considered as single white space. Reference the slide 19 in Lecture 03.
To compare the output of # of words, you can use the online website (https://wordcounter.io/).
Requirements (& Grading policy):
1. You need to add your student name and student id in the first line of the program. (2pt)
2. You must add comments in your source codes. (5pt)
3. Create an immutable variable named as “sentences”. (2pt)
4. Correctly determine # of alphabets. (4pt)
5. Correctly determine # of words. (4pt)
6. Correctly determine # of digits. (4pt)
7. Correctly determine # of white space characters. (4pt)
8. Correctly determine # of special characters. (4pt)
9. Your Scala source code must be named as “YourLastname_Assignment02.scala”. (2pt)
10. Your jar file must be named as “YourLastname_Assignment02.jar”. (2pt)
11. You need to zip the two files (YourLastname_Assignment02.scala and YourLastname_Assignment02.jar)
as “YourStudentID_Assignment02.zip”. For instance, if your student ID is N012345, the zip file name
must be N012345_Assignment02.zip. Submit the zip file to the Blackboard. (2pt)
Sample Testing datasets
On March 5, 2014, the College Board announced that a redesigned version of the SAT would be administered for
the first time in 2016. The current SAT, introduced in 2016, takes three hours to finish, plus 50 minutes for the SAT
with essay, and as of 2017costs US$45 (US$57 with the optional essay), excluding late fees, with additional
processing fees if the SAT is taken outside the United States.
The design of Scala started in 2001 at the Ecole Polytechnique Federale de Lausanne (EPFL) (in Lausanne,
Switzerland) by Martin Odersky. It followed on from work on Funnel, a programming language combining ideas
from functional programming and Petri nets.[14] Odersky formerly worked on Generic Java, and javac, Sun’s Java
compiler.[14]
Purchase answer to see full
attachment