Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program which will take the name of the file as a command - line prompt and validate the data. If there are

Write a Java program which will take the name of the file as a command-line prompt and validate the data. If there are no errors, your program should output the number of records processed. If there are errors, you should print the name of the person with the error, and a clear message about which line contained the problem. After validation, output the number of records which had at least one error and the number which were correct.
baddata.txt
James J Smith
964-2826
123 Elm St Apt 4B
Springfield, 6271
Judy Sm1th
(713)926-6343
100 Lavender St
Dupo, TX 62239
Emily Johnson-Smith
(409)8648-0383
456 County Rd 123
Oakdale Center, TX 37829
Thurston T. Howell, III
(979)239-7690
344 Indian Summer
TX 75081
William Brown
(956)251-1347
RR 7
Ruralville, TX 75234
Wesley McKay
(512)241-6166
29 Grant St
Rosenberg, TX
gooddata.txt
James J Smith
(512)964-2826
123 Elm St Apt 4B
Springfield, TX 62701
Judy Smith
(713)926-6343
100 Lavender St
Dupo, TX 62239
Emily Johnson-Smith
(409)868-0383
456 County Rd Apt 123
Oakdale Center, TX 37829
Thurston T. Howell, III
(979)239-7690
344 Indian Summer Rd
Richardson, TX 75081
William Brown
(956)251-1347
RR 7 Box 2A
Ruralville, TX 75234
Wesley McKay
(512)241-6166
29 Grant St
Rosenberg, TX 77471

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

LO 14-1 What interview channels you may encounter.

Answered: 1 week ago

Question

What are you unwilling to do? What are you willing to do?

Answered: 1 week ago