Search:

Type: Posts; User: TmDee

Search: Search took 0.07 seconds.

  1. Playlist Shuffle with Collections.shuffle(......)

    We got assigned to make a mediaplayer with a playlist and some extra functions, the last function that doesn't work is the shuffle one.

    I'll drop here the main. I know it's long..

    ...
  2. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    This SHOULD BE the console:

    Jordan d34
    d34 Jordan
    Jordan null
    d34 null
    Jordan d34
    d34 Jordan
    Jordan null
    d34 null
  3. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    I think my code says.

    Make a Patient with naam: Jordan.
    Then make a bed with nummer d34.
    Then setBed(b1) does sets the number d34 to patient p1.
    So when we print out p1 it return naam: Jordan...
  4. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    Yes thank you I get that but I sorry, I can't see in my code where an variable is null, before I use a method to delete an variable.
  5. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    Okay, I see but I still don't get it why it gives that null error, I probably should just wait and ask to my prof
  6. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    Yes indeed it becomes null with the method, verwijderBed then it's says the value to zero but never before. I don't see it where it is null in the beginning do you?
  7. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    I don't know why it's null, none of the variables is null from the object I try to print out.

    The console should be:


    Jordan d34
    d34 Jordan
    Jordan null
    d34 null
    Jordan d34
  8. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    Don't get how it can give null value if I print the variables b1.getNummer() en p1.getNaam() it gives the values I want but when I put it in the toString methode it gives an error like you said a...
  9. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    public class Bed {
    private String nummer;
    private Patient patient;

    public String toString() {
    return nummer +" " + patient.getNaam();
    }


    public Bed(String num) {
  10. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    I searched a bit more but apparently it's an excercise about a subject that we haven't learn yet, so i'll be probably in the weekend back on to this!
  11. Replies
    19
    Views
    1,665

    Re: Errors while printing out

    I see so I deleted this from line 7 for both classes and it only prints out


    Jordan
    d34
    Jordan
    d34
    Jordan
    d34
    Jordan
  12. Replies
    19
    Views
    1,665

    Errors while printing out

    This is the main:


    public class main {
    public static void main(String[] args) {
    Patient p1 = new Patient("Jordan");
    Bed b1 = new Bed("d34");
    p1.setBed(b1);
    System.out.println(p1);...
  13. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    Okay I read this and kinda understand this, but I think my prof will teach us later about that thanks tho both for the help! Really appreciate it!!
  14. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    What do you mean final?
  15. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    Thanks Norm and Jim for the help! I found it let me show it.

    This is the main:


    public class main {

    public static void main(String[] args) {
    ComplexGet getal1 = new ComplexGet(1.0,...
  16. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    public class main {

    public static void main(String[] args) {
    ComplexGet getal1 = new ComplexGet(1.0, 2.0);
    ComplexGet getal2 = new ComplexGet(3.0, 4.0);
    System.out.printf("Som = %.1f +...
  17. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    Som = 4,0 + 6,0i
    Vermenigvuldiging = -12,0 + -30,0i
    Inverteren = 899,9 + 900,0i
    This is the console log and it should be by "vermenigvuldigen" -5 + 12i.

    And your suggestion I don't really...
  18. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    Yeah well I saw that so i posted the answers of the console under the image and it just didn't make any difference by clearing those commands that Jim told me.
  19. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    Yeah saw that now too, thanks Jim!
  20. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Re: Complex Numbers

    3501
    Console says for "optellen 4.0+6.0i. <-- this is correct.
    for "vermenigvuldigen" : -12.0 + -30.0i
    for "inverteren" : 899.9 + 900.0i

    For multiplication, "vermenigvuldigen" the answer should...
  21. Thread: Complex Numbers

    by TmDee
    Replies
    18
    Views
    1,409

    [SOLVED] Complex Numbers

    public class ComplexGet {
    private double re, im;

    public ComplexGet(double reëel, double imag) {
    re = reëel;
    im = imag;
    }

    public double real() {
    return re;
Results 1 to 21 of 21