Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: need help with code

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default need help with code

    Need to know if what I have so far is correct, also need help with the calculate to change and string methods.

    This is the assignment:

    v6XF2y8.jpg

    public class ChangeMaker {
     
    	private double money;
    	private int numberOfQuarters;
    	private int numberOfDimes;
    	private int numberOfNickels;
    	private int numberOfPennies;
     
    	public ChangeMaker() {
    	numberOfQuarters = 0;
    	numberOfDimes = 0;
    	numberOfNickels = 0;
    	numberOfPennies = 0; 
    }
     
     
    	public double getMoney() {
    		return money;
    	}
    }
    public void setMoney(double amount) {
    	money = amount;
    }
    public void calculateChange(); {
     
    }
    public String toString(); {
     
    }
     
    }


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: need help with code

    What do you mean, "need help with the calculate to change and string methods?"

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: need help with code

    i don't know how to put in those methods, i've only been learning java for a few weeks now.

  4. #4
    Grand Poobah
    Join Date
    Mar 2011
    Posts
    1,545
    My Mood
    Grumpy
    Thanks
    0
    Thanked 167 Times in 158 Posts

    Default Re: need help with code

    Please provide better information and ask a specific question. Don't expect people to follow a link. Copy and paste (or post a concise version) or your assignment. "I don't know how/what ....." type statements are not specific and not questions.
    Improving the world one idiot at a time!

Similar Threads

  1. Replies: 3
    Last Post: April 27th, 2013, 07:19 AM
  2. Replies: 4
    Last Post: January 24th, 2013, 11:20 AM
  3. Replies: 7
    Last Post: January 24th, 2013, 10:41 AM
  4. Replies: 5
    Last Post: November 14th, 2012, 10:47 AM
  5. Replies: 3
    Last Post: September 3rd, 2012, 11:36 AM