Question: JAVA PROGRAMMING HELP!!: Create a package with Class Objects that creates or appends to a log file with the following parameters: Must accept the following

JAVA PROGRAMMING HELP!!:

Create a package with Class Objects that creates or appends to a log file with the following parameters:

Must accept the following parameters:

i.Log File Action: N=New Log file. A=append to file name provided

ii.File Path: If does not exist do not create throw error saying file path does not exist

iii.File Name: File Name should be unique if N (New Log File). If file already exist throw error. If user passes A and if file does not exist throw error saying file does not exist

iv.User Comments in String format (60 Characters)

Example:

AlrApplLib.LogFile(N, C:\Smith\Personal\Johnny,TrackPatientProcess.Log,Start Program for Patient Transaction);

AlrApplLib.LogFile(A, C:\Smith\Personal\Johnny,TrackPatientProcess.Log,Get New Patient Data);

AlrApplLib.LogFile(A, C:\Smith\Personal\Johnny,TrackPatientProcess.Log,Processing Patient John Doe);

AlrApplLib.LogFile(A, C:\Smith\Personal\Johnny,TrackPatientProcess.Log,End Program Patient Transaction);

The File Log Should Look Like This:

2018-02-13 11:06:10 Start Program for Patient Transaction

2018-02-13 11:06:11 Get New Patient Data

2018-02-13 11:06:12 Processing Patient John Doe

2018-02-13 11:06:13 End Program Patient Transaction

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!