Objectives:
create FileLogger, its parent class, and the associated classes – the factory class, a LoggerException class that wraps exceptions such as IOException, and an enumeration class for the...
Type: Posts; User: nickar1172
Objectives:
create FileLogger, its parent class, and the associated classes – the factory class, a LoggerException class that wraps exceptions such as IOException, and an enumeration class for the...
how does this look?
import java.util.*;
import java.text.*;
import java.io.*;
public class FileLogger extends SimpleLogger {
private File logFile;
This is what I came up with but I am not sure that I have all the requirements
import java.util.*;
import java.text.*;
import java.io.*;
public class FileLogger extends SimpleLogger {
...
When a message is logged, the logfile should contain the following information: A timestamp The log level of the message The component that the program was in when the message is logged
The...
Ok here it is this I'm creating a FileLogger and its a singleton by design, I need to log messages to the file, once I have the new file I need to append the log message to the end of the file....
i don't know any log() methods that's the problem, I am a beginner in an advanced course, I thought the methods that I already have are the log methods that output but I guess I'm wayyyy off
---...
yes but what log methods are you talking about that is where I am also lost
This is what I need to do:
When a message is logged, the logfile should contain the following information: A timestamp The log level of the message The component that the program was in when...
This is my new code, apparently my logger methods are "empty" and because of that I have no output. How do I go about fixing this??
import java.util.*;
import java.text.*;
import java.io.*;
...
how would i go about changing that
wow so I changed it and when I run the program I am getting zero output........its supposed to show a timestamp, log level, component that the program was in when the message is logged, and message...
I've been trying for hours and I mean hours to get this to work and I keep getting this compiler error if anyone can please help me it would be greatly appreciated.
I am getting the Exception...
but then wouldn't the file logger be an abstract also if it extends SimpleLogger? so then the FileLogger class would be :
public abstract class FileLogger extends SimpleLogger
but then it would change:
public class MyProgram {
private SimpleLogger logger;
public static void main(String[] args) {
try {
SimpleLogger logger =...
but since FileLogger is a singleton doesnt that make the constructor private to something like
return new FileLogger();
cant be compiled?
public class LoggerFactory {
public static SimpleLogger getLogger(String log) {
return new SimpleLogger(log);
}
}
I had a feeling that it had to be changed to abstract as well as the set method I just overlooked.
This is the error code I keep getting:
Exception in thread "main"...
I keep getting this error and I cant figure out why, the only thing is I cannot change the My Program class bc that was given by my instructor everything else is flexible
public abstract class...
1. Yes it is a project requirement
2. I'm not 100% positive the only thing I know is that we create our own exceptions so whatever is needed to be inputted in regards to error that are in the file...
We start with a SimpleLogger which is an abstract class. It is a parent class of FileLogger, which is a concrete Singleton class that represents a single Logger. It also has all of the methods...
Ok so here it goes, I have the format down I just don't know where and what the syntax is supposed to be for these classes. I have 5 classes:
SimpleLogger - Abstract Class
FileLogger - Singleton...
LP: List the visits for a given patient
LD: List the visits for a given doctor
D: List the visits on a given date
I cant seem to figure this out for my life, also for some stringtokenizer for...
The best way for me to answer this question is that this is what the exact output is supposed to be:
Please enter a command
AP: Add a patient
AD: Add a doctor
V: Record a visit
LP: List the...
I've been trying to get this done for days and the deadline is tomorrow...
The patients who are registered at the Smiley GoodDoctors practice can see any of the specialists. The practice keeps...