Declares three arraylist objects referenced by the objects

Assignment Help JAVA Programming
Reference no: EM13811969

STEP 1: Index

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.

STEP 2: Index2

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.

STEP 3: ThreeArrayLists

Write a program 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 };

Reference no: EM13811969

Questions Cloud

Determine the tensile stress in each segment : Determine the tensile stress in each segment of the bar shown. Segment AB has a square cross section 2in by 2in. Segment BC has a circular cross section with a diameter of 1.75in. The tensile load P = 75 kips.
Find a sample phishing email : Use Google to find a sample phishing email which there are many of on the Internet
What are things that a teacher can do to learn about culture : Why is it important for teachers to discern the cultural differences among their students? What are some things that a teacher can do to learn more about the cultures of their learners? How could this influence lesson planning?
Understanding and coping with change : Change is everywhere, yet very few people seem to embrace the concept. We are, for the most part, creatures of habit and follow daily routines. When change occurs, our activities and thought patterns are disrupted.
Declares three arraylist objects referenced by the objects : Write a program called ThreeArrayLists.java that declares three ArrayList objects referenced by the objects named priceList, quantityList, and amountList
Examine the application of epidemiology to specific diseases : Examine the application of epidemiology to specific diseases
Explain juvenile territorial court jurisdictions : Explain juvenile territorial court jurisdictions. Discuss the four major categories where a juvenile may be transferred from juvenile court to adult court. Discuss child molestation.
Calculate the average speed of the car : What is distance in meters - Calculate the average speed of the car for the first part of the trip.
How do you think poor people feel about way they are treated : How do you think poor people feel about the way they are treated?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd