Interactive java program that asks a user for some interest

Assignment Help Basic Computer Science
Reference no: EM13165693

Create an interactive Java program that asks a user for some text of interest and then displays the first email address found in that text. (This is the basis for one of the programs that spammers use to mine text, such as email messages, Web pages, and blogs, to find email addresses they can then add to their lists of people to spam.) For our purposes, an email address is composed of an "@" and the two maximal-length strings with no embedded whitespace surrounding that "@". If there is no email address in the text, then the program should display just an "@".

Construct the class EmailAddress.java.

Example Output


Email Address Harvester

Input text: Please send questions to me at [email protected] before noon today.


Extracted email address: [email protected]

Hint: I suggest you use the 'split' method of the String class. This method will divide a given string into tokens based on any dividing character you choose. For example, if you split an input sentence based on a space " ", you will get an array of words that you can process one at a time using a loop.

 

Reference no: EM13165693

Questions Cloud

Calculate the total of a purchase from a farmer''s market : You will develop a program that can calculate the total of a purchase from a farmer's market that sells apples, bananas, and oranges. At this particular market, apples are $1.99/lb., bananas are $0.99/lb., and oranges are $1.50/lb. Users should be..
Write a matlab program to generate a data file : 1.) Write a Matlab program to generate a data file containing the names and corresponding telephone numbers of the customers. 2.) Using the data file created, write a program in Matlab to create a menu-driven facility to preform the following tasks
State a cylindrical bar of metal having a diameter : A cylindrical bar of metal having a diameter of (4.740x10^0) mm and a length of (9.9406x10^2) mm is deformed elastically in tension with a force of (1.281x10^4) N.
Matrix chain multiplication problem : Give an example which shows that in the matrix chain multiplication problem, adding a matrix on the right can force the breakpoint to the left. You can find an example using just 4 matrices
Interactive java program that asks a user for some interest : Create an interactive Java program that asks a user for some text of interest and then displays the first email address found in that text. (This is the basis for one of the programs that spammers use to mine text, such as email messages, Web pages, ..
Write a method called median : Write a method called median that accepts an array of integers as its argument and returns the median of the numbers in the array. The median is the number that will appear in the middle if you arrange the elements in order
Part of your first project : On completion of this course you are hired by the company Tickets R Us. Part of your first project is to develop an application to assist with the selling of tickets. After discussing with your client
Write a program to analyze students course marks : Write a program to analyze students course marks. The program should read in students course marks from "m2-grading.txt". The data file has a headline including students ID#, course-1marks, course-2 marks and course-3 markes.
Describe heat transfer between the gas and the tank : A tank containing carbon dioxide at 400K and 50 bar is vented until the temperature in the tank falls to 300K. Assuming there is no heat transfer between the gas and the tank

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine value of maximum element for mle is maximum

Assume that n = 5 points are drawn from distribution and maximum value of which occurs to be 0.6. Plot likelihood p(D|) in range 0  1. Describe in words why you do not need to know values.

  Create two-page written analysis for problem statement

Create a two-page written analysis based on the following specification: Problem statement, Possible outcomes if no action taken (this one is mine and the only thing i have to do) Alternative actions.

  Descriptions of data formats and to interpret raw data

The aim of this project is to exercise and test your ability to read and understand descriptions of data formats and to interpret raw data according to a particular format.  In this exercise you will produce and read the dump of a ZIP file.

  Solve problem and categorize it by using big-theta notation

Sometimes slight change in problem can significantly modify form of its solution. For instance, determine simple algorithm for solving following problem and categorize it using big-theta notation.

  Circuit diagram-truth table for half subtractor-full adder

Illustrate the circuit diagram of the following circuit and create truth table for half subtractor and full adder. Full subtractor and Half adder.

  Maslow hierarchy of needs

Discuss and explain how the theory designates the team member roles and responsibilities also discuss how Maslow's Hierarchy of Needs applies to professional work dynamics.

  Required value for the move command

Shape_index is a required value for the move command. It is the index of the shape in the shape data arrays that you wish to move. It should range between 0 and MAX_SHAPES - 1. Be sure to validate the index.

  Deriving logging information for chinese wall model

In the example of deriving required logging information for the Chinese Wall model, it is stated that the time must be logged.Why? Explain.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Classify occurrences as an incident or disaster

Classify each of the following occurrences as an incident or disaster. If an occurrence is a disaster, determine whether or not business continuity plans would be called into play.

  Explain how to complete team roles inventory

To do this, well complete Team Roles Inventory. After you have completed inventory, what roles are you most probable to play? How do these roles compare with other?

  . assume the node is in the usual info-link form with info

Show what is produced by the following C++ code. Assume the node is in the usual info-link form with the info of the type int. (list, trail, and current are pointers of type nodeType.)

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