Results 1 to 4 of 4
  1. #1
    jerseytreg5 is offline Member
    Join Date
    May 2014
    Posts
    2
    Rep Power
    0

    Default Bank Account Problem (Really Confused)

    Hi All,
    Thank you for welcoming me to your forum. I just finished my Freshman year of college and am taking a 3 week summer course (Intro to Proramming). I have a teacher that does not speak English well and it has made the class very difficult for me to understand. We have this lab due tomorrow that I am working on but I have sort of hit a dead end and am really confused. I am attaching screen shots so perhaps someone could advise me on how to continue. Thanks in advanced.
    Attached Thumbnails Attached Thumbnails Bank Account Problem (Really Confused)-bank-account-1.jpg   Bank Account Problem (Really Confused)-bank-account-2.jpg   Bank Account Problem (Really Confused)-bank-account-4.jpg   Bank Account Problem (Really Confused)-bank-account-5.jpg  

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Bank Account Problem (Really Confused)

    Do you have any specific questions about your problem?

    If you have code, please post it and be sure to wrap it in code tags.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    jerseytreg5 is offline Member
    Join Date
    May 2014
    Posts
    2
    Rep Power
    0

    Default Re: Bank Account Problem (Really Confused)

    Java Code:
    import java.util.Scanner;
    import java.text.NumberFormat;
    
    public class BankAccount {
    
    	
     private String name;
     private String accountnumber;
     private double currentbalance;
     private String address;
    
    
    public BankAccount (String name, String accountnumber,  String address)
    {
    this.name = name;
    this.accountnumber = accountnumber;
    this.currentbalance = 0;
    this.address = address;
    }
    
    public String getName()
    {
    	return name;
    }
    
    public String getAddress()
    {
    	return address;
    }
    
    public void setName (String newName)
    {
    	name = newName;
    }
    
    public void setAddress (String newAddress)
    {
    	address = newAddress;
    }
    
    public void display()
    {
    	String newName = name;
    	System.out.println ("Name:" + newName);
    	String  newAddress = address;
    	System.out.println ("Address:" + newAddress);
    	
    }
    
    public static void main(String[] args) {
    	// TODO Auto-generated method stub
    I am curious about how I would write the print method with the dollar and cents and current balance. Additionally, how do I go about writing a new method? Sorry if I am asking this in the wrong way.
    Last edited by jerseytreg5; 05-26-2014 at 10:32 PM.

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default Re: Bank Account Problem (Really Confused)

    how do I go about writing a new method?
    There are a lot of methods in the code you have posted. What problems are you having writing another one?
    See the tutorial: Defining Methods (The Java™ Tutorials > Learning the Java Language > Classes and Objects)

    Please edit your post and wrap your code with code tags:
    [code]
    YOUR CODE HERE
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Help bank account assignment
    By bnto_kmls in forum New To Java
    Replies: 3
    Last Post: 11-04-2013, 08:57 PM
  2. Simple Bank Account Program - Completely Confused
    By Interista in forum New To Java
    Replies: 4
    Last Post: 11-02-2011, 03:12 AM
  3. basic bank account
    By captain_turkiye in forum New To Java
    Replies: 5
    Last Post: 10-16-2011, 06:15 PM
  4. java bank account problem
    By awil121 in forum New To Java
    Replies: 1
    Last Post: 10-13-2010, 11:47 PM
  5. Bank Account
    By HPcompaq256 in forum New To Java
    Replies: 11
    Last Post: 02-26-2010, 10:05 PM

Posting Permissions

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