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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started