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

  Write program that convert us dollar into canadian dollar

Design a new class named Polygon that extends GeometricObject and implements Comparable. The number of sides in polygons varies, you cannot use a certain number of data fields for sides of a polygon - Write a program that passes an unspecified numb..

  Assume an ideal gas mixture is in contact with water

Assume an ideal gas mixture is in contact with water. Determine the equilibrium concentration of the contaminant in the liquid is the gas stream is composed of 200 ppm of benzene in air

  Create a java class named headphones

Create a Java class named HeadPhones to represent a headphone set. The class contains- A private String data field named manufacturer that specifies the name of· A private boolean data field named pluggedIn that specifies if the headphone is plugge..

  Create a 2d array of randomly generated ints

Write a complete Java class that will create a 2D array of randomly generated ints that of size 5 rows and 10 columns. Print the values of each cell to a 5x10 table.

  Your task for this project is to design a program to help a

your task for this project is to design a program to help a videorental store operatorrecord clients transactions.nbsp

  Write an application that uses string method region

Write an application that uses String method region - Matches to compare two strings input by the user. The application should input the number of characters to be compared and the starting index of the comparison.

  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.

  String copy and string concatenation functions

Write the string copy and string concatenation functions -  Append n characters from string2 to stringl by using pointer arithmetic

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  What are bufferedinput/outputstreams

What are BufferedInput/OutputStreams and why are they used? Write some Java code to illustrate how to create a BufferedInputStream.

  Create a class safestack that implements a stack of strings

Create a class SafeStack that implements a stack of strings

  Report the last letter of each word in the string

Write a sequence of Java statements that report the last letter of each word in the string.

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