Search:

Type: Posts; User: nickar1172

Search: Search took 0.50 seconds.

  1. Replies
    1
    Views
    153

    Whats wrong with my program?

    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...
  2. Re: Creating a file logger using Singleton, factory, and abstract class

    how does this look?

    import java.util.*;
    import java.text.*;
    import java.io.*;


    public class FileLogger extends SimpleLogger {

    private File logFile;
  3. Replies
    5
    Views
    124

    Re: Log() method in need of fixing please

    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 {
    ...
  4. Replies
    5
    Views
    124

    Re: Log() method in need of fixing please

    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...
  5. Replies
    5
    Views
    124

    Log() method in need of fixing please

    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....
  6. Re: Creating a file logger using Singleton, factory, and abstract class

    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

    ---...
  7. Re: Creating a file logger using Singleton, factory, and abstract class

    yes but what log methods are you talking about that is where I am also lost
  8. Replies
    6
    Views
    161

    Re: java.lang.NullPointerException

    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...
  9. Re: Creating a file logger using Singleton, factory, and abstract class

    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.*;

    ...
  10. Replies
    6
    Views
    161

    Re: java.lang.NullPointerException

    how would i go about changing that
  11. Replies
    6
    Views
    161

    Re: java.lang.NullPointerException

    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...
  12. Replies
    6
    Views
    161

    java.lang.NullPointerException

    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...
  13. Re: Creating a file logger using Singleton, factory, and abstract class

    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
  14. Re: Creating a file logger using Singleton, factory, and abstract class

    but then it would change:

    public class MyProgram {

    private SimpleLogger logger;

    public static void main(String[] args) {
    try {
    SimpleLogger logger =...
  15. Re: Creating a file logger using Singleton, factory, and abstract class

    but since FileLogger is a singleton doesnt that make the constructor private to something like

    return new FileLogger();

    cant be compiled?
  16. Re: Creating a file logger using Singleton, factory, and abstract class

    public class LoggerFactory {


    public static SimpleLogger getLogger(String log) {

    return new SimpleLogger(log);
    }

    }
  17. Re: Creating a file logger using Singleton, factory, and abstract class

    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"...
  18. Re: Creating a file logger using Singleton, factory, and abstract class

    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...
  19. Re: Creating a file logger using Singleton, factory, and 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...
  20. Re: Creating a file logger using Singleton, factory, and abstract class

    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...
  21. Creating a file logger using Singleton, factory, and abstract class

    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...
  22. Re: **Struggling severly can any expert help**

    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...
  23. Re: **Struggling severly can any expert help**

    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...
  24. Re: **Struggling severly can any expert help**

    fixed
  25. **Struggling severly can any expert help**

    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...
Results 1 to 25 of 25