SlideShare a Scribd company logo
1 of 5
SOLUTIONJUG.COM
CLICK HERE TO GET THE SOLUTION !!!!!!!!!!
CIS/355 iLab 6 of 6
Write a Java GUI application called Index.java that inputs several lines of text and a search
character and uses String method indexOf to determine the number of occurrences of the character
in the text. This program is not case sensitive and both upper and lower case must be counted for.
Sample Program output: View Output Description
Grading Rubric
Index Points Description
Standard header
included
1
Must contain program's name, student name, and description of
the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Correct GUI interface
is created
3
Program contains a text area for text input, text box for
character input, and the appropriate labels
Correct output is
displayed
4
Program displays the correct count for both upper and lower
case of the input letter
Subtotal 10
OUTPUT DESCRIPTION ABOVE:
Step 1 Sample Program Output
The output of Index.java application contains the following user controls and alignment of the
controls:
1. Main form has a title of “Character Finder”
2. Upper left corner, a label with the text “Enter Text to be searched”
3. At the top of the form, and just to the right of the “Enter Text” label is a multiline text field.
4. Immediately below the text field, and on the left side of the form, is a label with the text “Enter a
Character”.
5. Immediately to the right of the “Enter a Character” label is a small, textbox that will hold a single
character.
The sample output of the application has the following text in the input boxes:
1. In the large text field, the sentence “I learned Java strings in Week 6!”
2. The “enter the character” textbox, contains the character a
A standard dialog, or message box, shows the result the search and contains the results of the
search and contains the following:
1. Dialog label is “Results”
2. On the left side is the information icon, which is a circle inset with the character i
3. To the right of the information icon, is the output string “Number of a’s: 3
A command button with the text “OK” is centered on the bottom of the diagram.
STEP 2: Index2 (10 points)
Write a Java GUI application Index2.java based on the program in Step 1 that inputs several lines
of text and uses String method indexOf to determine the total number of occurrences of each letter
of the alphabet in the text. Uppercase and lowercase letters should be counted together. Store the
totals for each letter in an array, and print the values in tabular format after the totals have been
determined.
Sample Program output: View Output Description
Grading Rubric
Index2 Points Description
Standard header
included
1
Must contain program's name, student name, and description of
the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Correct GUI interface
is created
3
Program contains a text area for text input, text area for character
count, a button, and the appropriate labels
Correct output is
displayed
4
Program displays the correct count for both upper and lower case
of each letter of the alphabet
Subtotal 10
OUTPUT DESCRIPTION ABOVE:
Step 2 Sample Program Output
The Index2.java form design is a narrow, but long form and contains the following controls:
1. Form title is blank
2. Centered at the top is a label with text “Enter some text”
3. Below the “Enter some text” label is a multiple line text field.
4. Below the text field is a command button, with the text “Counter Occurrences of Each Letter”
5. Below the command button and centered on the form, is long, multiple line text field.
The following sample output of the application has the following text in the fields:
1. Entered text is “Write a Java GUI application Index2.jva based on the program in project1 that
inputs several lines of text and uses the string method indexOf to determine
2. The output of the application is listed in the long text field, with each letter and frequency of the
latter on the same line, separated by a tab space.
STEP 3: ThreeArrayLists (20 points)
Write a program in a GUI JFRAME called ThreeArrayLists.java that declares three ArrayList
objects referenced by the objects named priceList, quantityList, and amountList. Each ArrayList
should be declared in main() and should be capable of holding a minimum of 10 double-precision
numbers.
The numbers that should be stored in priceList are 10.62, 14.89, 13.21, 16.55, 18.62, 9.47,
6.58, 18.32, 12.15, 3.98.
The numbers that should be stored in quantityList are 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9 4.8.
Your program should pass object references to these three ArrayList objects to a method
named extend(), which should calculate the elements in the amountList ArrayList as the product of
the corresponding elements in the priceList and quantityList ArrayList, for example,
amountList.add(priceList.get(i) * quantityList.get(i)).
After extend() has put values into the amountList ArrayList object, create a method that displays the
results of all three lists. Appropriate formatting techniques need to be used to produce a formatted
output.
Tip: It is a good idea to create two arrays of type double to store the values that correspond to the
price and the values that correspond to the quantity, for example:
double[] PRICE_ARRAY = { 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98 };
double[] QUANTITY_ARRAY = { 4.0, 8.5, 6.0, 7.35, 9.0, 15.3, 3.0, 5.4, 2.9, 4.8 };
Sample program output:
1) 10.62 * 4.0 = 42.48
2) 14.89 * 8.5 = 126.56
3) 13.21 * 6.0 = 79.26
4) 16.55 * 7.35 = 121.64
5) 18.62 * 9.0 = 167.58
6) 9.47 * 15.3 = 144.89
7) 6.58 * 3.0 = 19.74
8) 18.32 * 5.4 = 98.93
9) 12.15 * 2.9 = 35.24
10) 3.98 * 4.8 = 19.1
Grading Rubric
ThreeArrayLists Points Description
Standard header included 1
Must contain program's name, student name, and
description of the program
Program compiles 1 Program does not have any error
Program executes 1 Program runs without any error
Created ThreeArrays class 2
ThreeArrays.java is created and contains all required
methods
priceList ArrayList is created and
contains the correct values
2
ArrayList object is created and contains correct
values
quantityList ArrayList is created
and contains the correct values
2
ArrayList object is created and contains correct
values
amountList ArrayList is created
and contains the correct values
2
ArrayList object is created and contains correct
values
extend method is created, which
receives arrays as arguments
2
extend method exists and contains the required
parameters
extend method calculates the
items in the amount ArrayList
object
2
extend method calculates the values that go in the
amount ArrayList and inserts those values in the
amount object
method that displays the values
of all three ArrayList objects is
created
2
display method is created and produces the required
output by formatting and printing the values in each
of the ArrayList objects
Correct output is displayed 3
Output looks like the required output shown in the
lab description
Subtotal 20
CLICK HERE TO GET THE SOLUTION !!!!!!!!!!

More Related Content

What's hot

Part I (1.5 points) Write a C++ program that reads a line from the key...
Part I (1.5 points)        Write a C++ program that reads a line from the key...Part I (1.5 points)        Write a C++ program that reads a line from the key...
Part I (1.5 points) Write a C++ program that reads a line from the key...
hwbloom104
 

What's hot (17)

Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
Module 4: Introduction to ASP.NET 3.5 (PowerPoint Slides)
 
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
Computer experiments   1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branchComputer experiments   1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
 
Devry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functionsDevry cis-170-c-i lab-4-of-7-functions
Devry cis-170-c-i lab-4-of-7-functions
 
SD & D Running Total
SD & D Running TotalSD & D Running Total
SD & D Running Total
 
Visual basics Express Project
Visual basics Express ProjectVisual basics Express Project
Visual basics Express Project
 
Visual Logic Project - 1
Visual Logic Project - 1Visual Logic Project - 1
Visual Logic Project - 1
 
Compiling and linking of a c code
Compiling and linking of a c codeCompiling and linking of a c code
Compiling and linking of a c code
 
Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...Computer aided environment for drawing (to set) fill in the blank from given ...
Computer aided environment for drawing (to set) fill in the blank from given ...
 
Prg 211 prg211
Prg 211 prg211Prg 211 prg211
Prg 211 prg211
 
Enhancements
Enhancements Enhancements
Enhancements
 
Software Quality Engineering
Software Quality EngineeringSoftware Quality Engineering
Software Quality Engineering
 
Visual Logic User Guide
Visual Logic User GuideVisual Logic User Guide
Visual Logic User Guide
 
A08
A08A08
A08
 
Error boundaries
Error boundariesError boundaries
Error boundaries
 
React refs
React refsReact refs
React refs
 
Part I (1.5 points) Write a C++ program that reads a line from the key...
Part I (1.5 points)        Write a C++ program that reads a line from the key...Part I (1.5 points)        Write a C++ program that reads a line from the key...
Part I (1.5 points) Write a C++ program that reads a line from the key...
 
Codesters word wall
Codesters word wallCodesters word wall
Codesters word wall
 

Similar to Cis 355 i lab 6 of 6

CIS/355 ilab 6 of 6
CIS/355 ilab 6 of 6CIS/355 ilab 6 of 6
CIS/355 ilab 6 of 6
helpido6
 
Cis 355 ilab 6 of 6
Cis 355 ilab 6 of 6Cis 355 ilab 6 of 6
Cis 355 ilab 6 of 6
ashhadiqbal
 
Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6
helpido9
 
Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6
comp274
 
Cis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universityCis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry university
sjskjd709707
 
Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6
ashhadiqbal
 
Hey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addiHey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addi
sorayan5ywschuit
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6
helpido9
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
comp274
 
Goals1)Be able to work with individual bits in java.2).docx
Goals1)Be able to work with individual bits in java.2).docxGoals1)Be able to work with individual bits in java.2).docx
Goals1)Be able to work with individual bits in java.2).docx
josephineboon366
 
Looping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptxLooping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptx
adihartanto7
 
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docxAssignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
ssuser562afc1
 
This assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docxThis assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docx
dunningblair
 

Similar to Cis 355 i lab 6 of 6 (20)

CIS/355 ilab 6 of 6
CIS/355 ilab 6 of 6CIS/355 ilab 6 of 6
CIS/355 ilab 6 of 6
 
Cis 355 ilab 6 of 6
Cis 355 ilab 6 of 6Cis 355 ilab 6 of 6
Cis 355 ilab 6 of 6
 
Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6Cis 355 i lab 2 of 6
Cis 355 i lab 2 of 6
 
Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6
 
Cis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universityCis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry university
 
Comp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codeComp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source code
 
Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6Cis 355 ilab 2 of 6
Cis 355 ilab 2 of 6
 
Hey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addiHey i have attached the required file for my assignment.and addi
Hey i have attached the required file for my assignment.and addi
 
Lab exp declaring arrays)
Lab exp declaring arrays)Lab exp declaring arrays)
Lab exp declaring arrays)
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
 
Bcsl 031 solve assignment
Bcsl 031 solve assignmentBcsl 031 solve assignment
Bcsl 031 solve assignment
 
Lab exam question_paper
Lab exam question_paperLab exam question_paper
Lab exam question_paper
 
Goals1)Be able to work with individual bits in java.2).docx
Goals1)Be able to work with individual bits in java.2).docxGoals1)Be able to work with individual bits in java.2).docx
Goals1)Be able to work with individual bits in java.2).docx
 
Looping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptxLooping in PythonLab8 lecture slides.pptx
Looping in PythonLab8 lecture slides.pptx
 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
 
C++ Lab Maual.pdf
C++ Lab Maual.pdfC++ Lab Maual.pdf
C++ Lab Maual.pdf
 
(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises
 
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docxAssignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
Assignment6~$signment6.docxAssignment6Assignment6.docxAs.docx
 
This assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docxThis assignment consists of four short programs. Use CodeBlock.docx
This assignment consists of four short programs. Use CodeBlock.docx
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Cis 355 i lab 6 of 6

  • 1. SOLUTIONJUG.COM CLICK HERE TO GET THE SOLUTION !!!!!!!!!! CIS/355 iLab 6 of 6 Write a Java GUI application called Index.java that inputs several lines of text and a search character and uses String method indexOf to determine the number of occurrences of the character in the text. This program is not case sensitive and both upper and lower case must be counted for. Sample Program output: View Output Description Grading Rubric Index Points Description Standard header included 1 Must contain program's name, student name, and description of the program Program compiles 1 Program does not have any error Program executes 1 Program runs without any error Correct GUI interface is created 3 Program contains a text area for text input, text box for character input, and the appropriate labels Correct output is displayed 4 Program displays the correct count for both upper and lower case of the input letter Subtotal 10 OUTPUT DESCRIPTION ABOVE: Step 1 Sample Program Output The output of Index.java application contains the following user controls and alignment of the controls: 1. Main form has a title of “Character Finder” 2. Upper left corner, a label with the text “Enter Text to be searched” 3. At the top of the form, and just to the right of the “Enter Text” label is a multiline text field.
  • 2. 4. Immediately below the text field, and on the left side of the form, is a label with the text “Enter a Character”. 5. Immediately to the right of the “Enter a Character” label is a small, textbox that will hold a single character. The sample output of the application has the following text in the input boxes: 1. In the large text field, the sentence “I learned Java strings in Week 6!” 2. The “enter the character” textbox, contains the character a A standard dialog, or message box, shows the result the search and contains the results of the search and contains the following: 1. Dialog label is “Results” 2. On the left side is the information icon, which is a circle inset with the character i 3. To the right of the information icon, is the output string “Number of a’s: 3 A command button with the text “OK” is centered on the bottom of the diagram. STEP 2: Index2 (10 points) Write a Java GUI application Index2.java based on the program in Step 1 that inputs several lines of text and uses String method indexOf to determine the total number of occurrences of each letter of the alphabet in the text. Uppercase and lowercase letters should be counted together. Store the totals for each letter in an array, and print the values in tabular format after the totals have been determined. Sample Program output: View Output Description Grading Rubric Index2 Points Description Standard header included 1 Must contain program's name, student name, and description of the program Program compiles 1 Program does not have any error Program executes 1 Program runs without any error Correct GUI interface is created 3 Program contains a text area for text input, text area for character count, a button, and the appropriate labels
  • 3. Correct output is displayed 4 Program displays the correct count for both upper and lower case of each letter of the alphabet Subtotal 10 OUTPUT DESCRIPTION ABOVE: Step 2 Sample Program Output The Index2.java form design is a narrow, but long form and contains the following controls: 1. Form title is blank 2. Centered at the top is a label with text “Enter some text” 3. Below the “Enter some text” label is a multiple line text field. 4. Below the text field is a command button, with the text “Counter Occurrences of Each Letter” 5. Below the command button and centered on the form, is long, multiple line text field. The following sample output of the application has the following text in the fields: 1. Entered text is “Write a Java GUI application Index2.jva based on the program in project1 that inputs several lines of text and uses the string method indexOf to determine 2. The output of the application is listed in the long text field, with each letter and frequency of the latter on the same line, separated by a tab space. STEP 3: ThreeArrayLists (20 points) Write a program in a GUI JFRAME called ThreeArrayLists.java that declares three ArrayList objects referenced by the objects named priceList, quantityList, and amountList. Each ArrayList should be declared in main() and should be capable of holding a minimum of 10 double-precision numbers. The numbers that should be stored in priceList are 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98. The numbers that should be stored in quantityList are 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9 4.8. Your program should pass object references to these three ArrayList objects to a method named extend(), which should calculate the elements in the amountList ArrayList as the product of the corresponding elements in the priceList and quantityList ArrayList, for example, amountList.add(priceList.get(i) * quantityList.get(i)).
  • 4. After extend() has put values into the amountList ArrayList object, create a method that displays the results of all three lists. Appropriate formatting techniques need to be used to produce a formatted output. Tip: It is a good idea to create two arrays of type double to store the values that correspond to the price and the values that correspond to the quantity, for example: double[] PRICE_ARRAY = { 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, 3.98 }; double[] QUANTITY_ARRAY = { 4.0, 8.5, 6.0, 7.35, 9.0, 15.3, 3.0, 5.4, 2.9, 4.8 }; Sample program output: 1) 10.62 * 4.0 = 42.48 2) 14.89 * 8.5 = 126.56 3) 13.21 * 6.0 = 79.26 4) 16.55 * 7.35 = 121.64 5) 18.62 * 9.0 = 167.58 6) 9.47 * 15.3 = 144.89 7) 6.58 * 3.0 = 19.74 8) 18.32 * 5.4 = 98.93 9) 12.15 * 2.9 = 35.24 10) 3.98 * 4.8 = 19.1 Grading Rubric ThreeArrayLists Points Description Standard header included 1 Must contain program's name, student name, and description of the program Program compiles 1 Program does not have any error Program executes 1 Program runs without any error Created ThreeArrays class 2 ThreeArrays.java is created and contains all required methods priceList ArrayList is created and contains the correct values 2 ArrayList object is created and contains correct values quantityList ArrayList is created and contains the correct values 2 ArrayList object is created and contains correct values amountList ArrayList is created and contains the correct values 2 ArrayList object is created and contains correct values extend method is created, which receives arrays as arguments 2 extend method exists and contains the required parameters extend method calculates the items in the amount ArrayList object 2 extend method calculates the values that go in the amount ArrayList and inserts those values in the amount object
  • 5. method that displays the values of all three ArrayList objects is created 2 display method is created and produces the required output by formatting and printing the values in each of the ArrayList objects Correct output is displayed 3 Output looks like the required output shown in the lab description Subtotal 20 CLICK HERE TO GET THE SOLUTION !!!!!!!!!!