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

  Simple java program that implements some basic file

Your code will prompt the user to enter a file name. If this file does not exist the program will produce an error message and exit. Otherwise the program will open the file and read a line from the file, reverse the line, and then print the line to ..

  Populate a one-dimensional array

Populate a one-dimensional array with the following grades in this order: 93, 61, 72, 45, 84, 51, 70, 83, 96, and 66. Use a loop to call a method from main() that adds

  Mean and standard deviation using using eclipse

Java programming to calculate Mean and standard deviation using Using Eclipse.

  Design implement and test an object-oriented java program

Design, implement and test an object-oriented Java program for processing single-variable polynomials represented as lists.

  Write a statement that writes both of their values

Given an interger variable i and floating-point variable f, write a statement that writes both of their values to standard output in the following format: i=value-of-i f=value-of-f.

  A common useful equation

In physics, a common useful equation for finding the position s of a body in linear motion at a given time t, based on its initial position s0, initial velocity v0, and rate of acceleration a, is the following: ??= ??0+??0??+12????2. Write code to de..

  Write a java program that will play connect four

Write a java program that will play connect four - Must be a simple program no applets, jframes.

  Method level comment

What type of information should be included in a method level comment?

  What makes a program easy to modify

Describe the order of magnitude of the code section using Big(O) notation and Explain the relationship between dynamic storage allocation and recursion.

  Scanning and parsingimplement the lexical and syntactic

scanning and parsingimplement the lexical and syntactic analysis of minifun programming language. the scanner splits up

  Part-2write a program that will perform some of the basic

part-2write a program that will perform some of the basic tasks accomplished by a file integrity checker such as

  Create online store web site

the Java and JSP source codes and SQL scripts for creating a database in Oracle - any configuration files used

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