Question: Question 3 : Email Address Extractor Write a program that scans a text file for possible e - mail addresses and writes all email address
Question : Email Address Extractor
Write a program that scans a text file for possible email addresses and writes all
email address to an output file.
Addresses look like this:
someonedsomewhere, net
Notice that the address contains no spaces and has an sign followed by at least
one period Programs such as this scan through web pages looking for email
addresses that become the targets of spam. Because of this, many web pages
contain disguised email addresses that can't easily be automatically extracted.
Your program should find email addresses in the lext file emailTexttxt
Question : Check Braces
A simple syntax check of java files is to count the number of open and closed
brackets. If the numbers are not the same, then a bracker is missing. Write a
program that reads a java file specified by the user and counts the number of open
brackets and the number of closed brackets It should then print out the
number of brackets missing. Use the file Athlete.java to test.
The braces in the Althlete.java fle match perfectly. So you should have equal
counts for opening and closing braces. You can then add and remove them from the
file to check if your program works as expected.
Question : Header Extraction
Write a program that reads a java fle specified by the user and prints all the method
headers only to a file called headers.txt Use the file Athlete.java to test.
A method header is for example:
public void getMunber int if
Your code should write the following headers to the file headers.txt
public class athlete f
public AthleteString nans, int age
public string gethanef
public int getAge
public dowble getlestThrom
publie strine tostring
private double getMininder
publis vold updatedouble newthrow
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
