Results 1 to 3 of 3
  1. #1
    lazarat is offline Member
    Join Date
    Sep 2012
    Posts
    13
    Rep Power
    0

    Default mutator method...something is wrong

    // Create a new Student variable and initialize using the default constructor.
    // Prompt the user for the first name, last name, major and gpa using dialog boxes
    // and store the user entered values in local variables.
    // Change the contents of the object to the values in the local variables using the
    // mutator methods.
    // Print the Student object using the dialogPrintStudent function.

    does this answer the question above??

    public void showdetail(){
    System.out.println("First Name: " + s1.setFname);
    System.out.println("Last Name: " + s1.setLname);
    System.out.println("gpa: " + s1.setGpa);
    System.out.println("major: " + s1.setMajor);
    }
    }

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default Re: mutator method...something is wrong

    Quote Originally Posted by lazarat View Post
    does this answer the question above??
    No it doesn't.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,455
    Rep Power
    20

    Default Re: mutator method...something is wrong

    lazarat, you have been told about the code tags in both the threads you started earlier. If you persist in posting unformatted code, your may be banned for a period.

    Kindly edit your post and add the code tags. If the forum software doesn't allow you to edit, post a reply with properly formatted code.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. what is wrong with this shuffle method??
    By javaa in forum New To Java
    Replies: 3
    Last Post: 09-06-2012, 03:30 AM
  2. Mutator Method help
    By Dex in forum New To Java
    Replies: 2
    Last Post: 07-29-2012, 08:59 AM
  3. What's wrong with this method?
    By jazzermonty in forum New To Java
    Replies: 2
    Last Post: 01-17-2011, 08:16 PM
  4. Mutator method for a calculator
    By Krakatau7 in forum New To Java
    Replies: 15
    Last Post: 01-11-2011, 12:15 AM
  5. mutator method
    By dirtycash in forum New To Java
    Replies: 7
    Last Post: 11-22-2007, 11:29 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •