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 3 of 3

Thread: ATM Project Help

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Location
    in an extremely competitive and hopeless economy
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default ATM Project Help

    (I will probably keep returning to this topic, for I have struggled with several small segments on this).

    So the instructions that I have to follow are: "create one Account object using the 3-argument constructor and pass these initial values – ID: 101, balance: 0.0, PIN: 1234."
    So far I've got:
    public Account(101, 0.0, 1234)
    	{
    		//what do I put here? I don't think I need to return anything..?
    	}
    I have another class called Account where I believe I have to use this constructor that I wrote:
    public Account(int i, double bal, int pi)
    		{
    			ID = i;
    			balance = bal;
    			PIN = pi;
    		}
    Am I passing the values correctly? "public Account" is getting an error; some of the solutions talk about EnumBody which I haven't learned in class yet. And I don't know what I'm supposed to put in the body...


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts
    If you don't understand my answer, don't ignore it, ask a question.

  3. The Following User Says Thank You to Norm For This Useful Post:

    Wawlden (March 2nd, 2014)

  4. #3
    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: ATM Project Help

    Welcome to the forum! Thank you for taking the time to learn to post code correctly. If you haven't already, please read this topic to learn other useful info for new members.

    Come back as often as you'd like or need, and good luck!

Similar Threads

  1. ATM simulation
    By diplomat in forum What's Wrong With My Code?
    Replies: 1
    Last Post: November 16th, 2013, 04:47 PM
  2. ATM SYSTEM
    By kevinmontano41 in forum Member Introductions
    Replies: 1
    Last Post: October 16th, 2013, 06:40 AM
  3. ATM program machine help
    By karolek0901 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 26th, 2012, 06:01 PM
  4. ATM machine
    By MostinCredible21 in forum Java Theory & Questions
    Replies: 2
    Last Post: December 6th, 2011, 05:09 PM
  5. help! simple ATM
    By galva in forum What's Wrong With My Code?
    Replies: 7
    Last Post: December 9th, 2010, 01:14 AM