Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in java where: Input: This will come from a text file. Student will create the messages. File will contain at a minimum

Write a program in java where:

Input: This will come from a text file. Student will create the messages.

File will contain at a minimum of 20 messages.

Messages shall contain status information about a topic you are familiar with, for example:

The alarm is set.

The alarm is disabled.

Check furnace emergency switch.

ProcessingPart1: Reading in the messages.

Read messages form the text file.

Parse the string and store each word into an array or arraylist.

Have other arrays that keep track of (1) The words posn in the array, (2) The # of words in a message, and (3) The posn of the words for each message.

Is part is finished when all messages have all of the words store into an array, with supporting indices stored in other arrays.

Part 2: Retrieving a message.

After messages are read in, ask use to enter the message number wish to retrieve.

Validate the number.

If valid, get the messages parts, put message together and display the message.

Look and ask for different messages until user is finished.

Output

After Part 1, display the array holding the messages, so we can see how the array were populated.

Display the message the user asked for.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Inference Control In Statistical Databases From Theory To Practice Lncs 2316

Authors: Josep Domingo-Ferrer

2002nd Edition

3540436146, 978-3540436140

More Books

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago