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: Account Class OOP Java....transaction, deposit and deduction problems using an array...need assistance fast!

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

    Default Account Class OOP Java....transaction, deposit and deduction problems using an array...need assistance fast!

    I need help with using the transaction array to update the deposit and deductions in the array...I honestly don't have enough time to sit down and work on it..due tomorrow and would like some assistance. Its beginner programming i know, but havent brushed up on it since summer. Thanks. Here is my code so far. the blank methods and incorporating the array updates is what im having problems with



    class Account {
    private String firstName;
    private String lastName;
    private double balance;
    private int accountNum;
    private double amount;

    //Create a transaction array of 10
    int [] rgiTransaction = new int[10];


    //Initial Account Info
    public Account(){
    firstName = "Quintin";
    lastName = "Jenko";
    balance = 0.0;
    accountNum = 123;
    }

    //Set Account Info
    public Account(String _firstName, String _lastName, double _balance, int _accountNum){
    firstName = _firstName;
    lastName = _lastName;
    balance = _balance;
    accountNum = _accountNum;
    }

    //Updates balance after deposit and transactions
    public double deposit(double depositamount){
    balance = balance + depositamount;

    return balance;
    }

    //Updates balance after deduction and transactions
    public double deduction(double _deductionAmount){
    balance = balance - _deductionAmount;

    return balance;
    }

    public void printLastFiveTransactions(){

    }

    public void printLastFiveDeposits(){

    }

    public void printLastFiveDeductions(){

    }


    //Print Account Info
    public void printAccountInfo(){
    System.out.println("First Name: " + firstName);
    System.out.println("Last Name: " + lastName);
    System.out.println("Account Number: " + accountNum);
    System.out.println("Balance: " + balance);
    }


    }


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Account Class OOP Java....transaction, deposit and deduction problems using an array...need assistance fast!

    Welcome to the forum
    See the Announcements page for help with using code tags.
    What problems are you having?

  3. #3
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    3,449
    My Mood
    Mellow
    Thanks
    86
    Thanked 476 Times in 467 Posts

    Default Re: Account Class OOP Java....transaction, deposit and deduction problems using an array...need assistance fast!

    The OP is requesting more time?

Similar Threads

  1. Loop to deposit money into bank account array
    By trancecommunity in forum What's Wrong With My Code?
    Replies: 9
    Last Post: February 7th, 2013, 03:36 PM
  2. Java, calling another public class from within the main class giving problems.
    By RandomGaisha in forum What's Wrong With My Code?
    Replies: 9
    Last Post: November 26th, 2012, 01:30 PM
  3. help with java class (deposit and withdraw problem)
    By pip0 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 10th, 2012, 05:34 PM
  4. Create a java small class for a bank account!!?
    By jon123 in forum Object Oriented Programming
    Replies: 2
    Last Post: March 24th, 2010, 11:00 AM

Tags for this Thread