Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

PLEASE USE JAVA, the starter code is given the input file is called p3.txt and is below: Weve got the answers to your questions Luddy

PLEASE USE JAVA, the starter code is given

the input file is called p3.txt and is below:

Weve got the answers to your questions Luddy Hall 700 N. Woodlawn Avenue Bloomington, IN 47408 812-856-5754 luddy@indiana.edu People directory Contact individual faculty and staff members. Myles Brand Hall 901 E. Tenth Street Bloomington, IN 47408 Parking The parking garage thats closest to most of our buildings is the Eleventh and Fee Garage. Luddy Undergraduate Office Admissions and campus visits 812-855-6159 Admissions and campus visit questions: luddyrec@indiana.edu Advising 812-856-2613 luddyadv@indiana.edu Records Questions about records, including readmission, certification, and graduation: siceugrd@indiana.edu Career Services Luddy Hall, first floor 812-856-4903 luddycareers@indiana.edu Development and Alumni Relations 812-856-5909 Luddy Graduate Office On-campus students Admissions GoLuddy@iu.edu 812-856-3960 Advising & Student Services Current graduate students: gradvise@indiana.edu 812-855-4841 Monday-Friday 8am-5pm Online students Schedule an admissions or advising appointment 812-856-5953 Admissions luddyonl@indiana.edu Advising & Student Services siceooe@indiana.edu

image text in transcribed

image text in transcribedimage text in transcribed

The input file contains the text of the Luddy Contact page. Write a program that 1. reads this file and 2. finds if a line contains an email address 3. prints the total number of email addresses in this file. A valid email address is of the form x@indiana.edu, where x is a sequence of characters. A line can contain only one email address. In your program write and use the following methods: returns true if str contains a valid IU email address of the form x@ indiana.edu, where x is a sequence of characters Examples: - hasEmail("Admissions and campus visit questions: luddyrec@indiana.edu") -> true - hasEmail("luddy@indiana.edu") -> true - hasEmail("GoLuddy@iu.edu") -> false // should be @indiana.edu - hasEmail("Admissions and campus visits") -> false input: file3-1.txt . You must download this file, save it in the files subfolder in the project folder and provide this filename to the Scanner in the starter code. usages ublic static void main(String[] args) throws FileNotFoundException \{ I/ add the downloaded filename Scanner in = new Scanner(new File( pathname: "files/")); // declare and initialize variables if needed while (in. hasNextLine()) \{ String line = in. nextLine(); II add your code here \} in.close(); I/ print the no of emails

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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students explore these related Databases questions

Question

Define turnover.

Answered: 3 weeks ago

Question

Assessment of skills and interests.

Answered: 3 weeks ago