Devam Ediyor

514872 Lab 6: Strings and Collections

Scenario/Summary

In this lab, you will create three programs:

[url removed, login to view]

[url removed, login to view]

[url removed, login to view]

Deliverables

Program files for the following program:

Index

Index2

ThreeArrayLists

At the beginning of ALL your programs, put the program name, your name, and a brief description of the program.

Example:

/***********************************************************

Program Name: Index

Programmer's Name: Nana Liu

Program Description: This program checks the occurrences of characters, etc...

************************************************************/

How to submit your assignment:

The programs MUST have the same names as the assignment title.

Each Java source file (*.java) must include a corresponding class file (*.class) program as evidence of success.

You must use a zipped folder to send your Weekly Assignment to the Dropbox. Do not send subfolders within your zipped folder. Place ALL of the .java and .class files for the week into the one zipped folder. The zipped folder should be named: YourLastName Week 6, and this zipped folder will contain all the weekly programming assignments.

Put all program source files in a Word document with a screen shot of all your program output.

L A B S T E P S

STEP 1: Index (10 points)

Write a Java GUI application called [url removed, login to view] 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.

Sample Program output:View Output Description

STEP 2: Index2 (10 points)

Write a Java GUI application called [url removed, login to view] 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

STEP 3: ThreeArrayLists (20 points)

Write a program called [url removed, login to view] that declares three arrayLists 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 price are [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view], and 3.98.

The numbers that should be stored in quantity are 4, 8.5, 6, [url removed, login to view], 9, 15.3, 3, 5.4, 2.9, and 4.8.

Your program should pass object references to these three arrays to a method named extend(), which should calculate the elements in the amount array as the product of the corresponding elements in the price and quantity arrays (for example, amount [i] = price[i] * quantity [i]).

After extend() has put values into the amount array, create a method that displays the results of all three lists. Appropriate formatting techniques need to be used to produce a formatted output.

Sample program output:

1) [url removed, login to view] * 4.0 = [url removed, login to view]

2) [url removed, login to view] * 8.5 = [url removed, login to view]

3) [url removed, login to view] * 6.0 = [url removed, login to view]

4) [url removed, login to view] * [url removed, login to view] = [url removed, login to view]

5) [url removed, login to view] * 9.0 = [url removed, login to view]

6) [url removed, login to view] * 15.3 = [url removed, login to view]

7) [url removed, login to view] * 3.0 = [url removed, login to view]

8) [url removed, login to view] * 5.4 = [url removed, login to view]

9) [url removed, login to view] * 2.9 = [url removed, login to view]

10) [url removed, login to view] * 4.8 = 19.1

Beceriler: Her şey Kabul, Java, PHP

Daha fazlasını görün: use collections java, strings programming, search string array, search character string, sample product brief, sample application letter, references letter, programs java collections, name product description, letter application sample, letter application format, java programming price, java php programmer, gui programming java, example application letter, programming strings, programming array strings, collections etc, beginning java programming, application letter sample, application letter example, letter word search, send dropbox files, description uses product, strings

İşveren Hakkında:
( 2 değerlendirme )

Proje NO: #2260804

Seçilen:

ranjitsinha

Ready to deliver you. Thanks.

0 gün içinde 15$ USD
(198 Değerlendirme)
5.6