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

  Explaining role-computer forensic investigator for law firm

You are the computer forensic investigator for a law firm. The firm acquired a new client, a young woman who was fired from her job for inappropriate files discovered on her computer

  How structured approach associates to creating programs

When building the house, structured, modular approach is better than haphazard approach. Describe how structured approach associates to creating programs.

  Explain what is file type-from where file types come

What is "file type?" Where do file types come from? Write down some of the information that file types give (tip: think about copying and pasting, also importing/exporting between files)?

  Explain dispatcher and data access object design

Prepare a two page paper comparing and contrasting five of design. Dispatcher - controls client access and re-directs or dispatches client requests to proper party which can be located on same or different tier.

  Study ai literature to find-task can be solved by computers

Study the AI literature to find whether or not the following tasks can presently be solved by computers. Give proper reference to support your answer.

  Differences between technical and technology skills

Describe in scholarly detail differences between technical and technology skills as they associate to telecommunications and how they relate to general expectations

  Information assets to estimate for risk management purposes

If the organization has three information assets to estimate for risk management purposes which vulnerability must be estimated for additional controls first? Which vulnerability must be evaluated last?

  Create table-balance on loan at end of month-visual basic

Using Visual basic a tv set is bought with the loan of 563 to be paid off with five monthly payments of 116 interest is 1% per month.

  Write subroutine in marie assembly that multiplies two value

Write a subtoutine in MARIE assembly that multiplies two values where the arguments for this subroutine are two pointers (each pointer pointing to a value). The routube, multiply (a,b), performs *a x *b where a's value is the address storing the valu..

  Designing a 24 cpu multiprocessor chip

designing a 24 CPU multiprocessor chip to compete with Intel PHI at a lower price point. Each core will run at 2 GHz and have a 32Kb L1 cache, 50ps access (per word), 8 word blocks, 4-way associative, write-through, 1% miss ratio There is a 6Mb L2 ca..

  Protect proprietary interest by addressing ethical issues

Advise whether you agree or disagree with CEO, specifically addressing ethical issues involved. Suppose you make a decision to hire a hacker, how would you protect your proprietary interests?

  Websites be required to adhere to section standards

what is the purpose then? Do you think that all websites should be required to adhere to Section 508 standards? Why or why not?

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