Search:

Type: Posts; User: JavaStudent100

Search: Search took 0.10 seconds.

  1. Replies
    0
    Views
    1,250

    Java assignment- Need help please

    Hello,

    I have a Java assignment and I am stuck at this point. Below is the requirement:

    1. Create a WindowMalfunction and PowerOut Events to simulate problems that may occur in a...
  2. Replies
    12
    Views
    2,322

    Re: Design Model-Assignment

    Am I not supposed to code it in a way that the scanner reads the txt file and copies it into buffer reader or something like that?

    Thanks
  3. Replies
    12
    Views
    2,322

    Re: Design Model-Assignment

    Awesome, so I add them five times.

    How about question 3? I have modified the code to the following:



    public class Restart extends Event {
    public Restart(long delayTime, String...
  4. Replies
    12
    Views
    2,322

    Re: Design Model-Assignment

    Would this makes sense:



    public class Bell extends Event {
    public Bell(long delayTime) { super(delayTime); }
    public void action() {
    // Bell rings
    addEvent(new Bell(5));
  5. Replies
    12
    Views
    2,322

    Re: Design Model-Assignment

    This is what the file says:


    Event=ThermostatNight,time=0
    Event=LightOn,time=2000
    Event=WaterOff,time=10000
    Event=ThermostatDay,time=12000
    Event=Bell,time=9000,rings=5...
  6. Replies
    12
    Views
    2,322

    Re: Design Model-Assignment

    I totally agree that it's a lot of code to dig through and I appreciate your help. I'd like to get some help on the following:

    2. Modify Bell Event so that it will be able to run an arbitrary...
  7. Replies
    12
    Views
    2,322

    Re: Design Model-Assignment

    Hi jps,

    Thanks for your prompt feedback. I am pretty new to Java programming. This is an intermediate level and I am totally lost. I need guidance around how to proceed. I have been testing...
  8. Replies
    12
    Views
    2,322

    Design Model-Assignment

    Hi guys,

    I have this assignment and I am puzzled. Please help:-s. Thanks.


    Step 2: In this part, we add implementation to existing design

    1. Add a boolean instance variable to...
Results 1 to 8 of 8