Question
Need this in JavaScript and PHP The program for this Assessment will consist of two sections, each headed by the three-line comment below: //********************************************************* //****Assessment
Need this in JavaScript and PHP
The program for this Assessment will consist of two sections, each headed by the three-line comment below:
//*********************************************************
//****Assessment 2 Program 2 Section X
//*********************************************************
(where X stands for the portion of the Assessment to follow)
Assessment Requirements
Section 1:
- Enter the comment with the section title as described above.
- You will create a two-dimensional string array of 4x4 elements named salesRegions.
- The first column of the array will contain the names of the sales regions, North, South, East, and West. Columns 2, 3, and 4 will contain the names of the personnel in charge of those sales regions and are listed below. Fill the array with this data.
North South East West Bob Sue Nathan Wanda Stef Janice Henry Charles Ron Will Kimmy Pete - Print to the console the statement, Section 1: Two-dimensional Array.
- Using nested loops, display the contents of the array by sales region. (See the expected output for an example.)
Section 2:
- Enter the comment with the section title as described above.
- Create an arraylist called salesTeam. The arraylist will contain the names of the sales team members responsible for the sales in that region. (Hint: This is using the collection tool, arraylist, and is not a standard array like the two-dimensional array in section 1.)
- Once created, use the two-dimensional array to add the names in the North region to the salesTeam arraylist. (Notice: You are just adding the names of the people, not the name of the region. So, in this case the names added should be Bob, Stef, and Ron.)
- Print to the console a blank line and the statement, Section 2: Array List.
- Using the methods available in the arraylist class, display the current number of elements in the salesTeam arraylist.
- Next, add the names of the people from the South region to the salesTeam arraylist.
- Using the appropriate method available in the arraylist class, check to see if Stef is in the salesTeam arraylist and print a statement as to whether or not Stef is in the list.
- Display the number of items in the salesTeam arraylist.
- Remove Janice and Ron from the salesTeam arraylist.
- Display the number of items in the salesTeam arraylist.
- Using a loop, display Names currently in the salesTeam arraylist. followed by all the elements remaining in the salesTeam arraylist.
EXPECTED OUTPUT
Section 1: Two-dimensional Array.
North
Bob
Stef
Ron
South
Sue
Janice
Will
East
Nathan
Henry
Kimmy
West
Wanda
Charles
Pete
Section 2: Array List.
There are 3 names in the salesTeam arraylist.
Stef is in the salesTeam arraylist.
There are 6 names in the salesTeam arraylist.
There are 4 names in the salesTeam arraylist.
Names currently in the salesTeam arraylist.
Bob
Stef
Sue
Will
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started