I have a fortran program where I am suppose to write a set of java classes that implements some accounts and the required transactions and a main test program that exercises the classes based on the specified information we have. I can't put all the info up here bc it would be too much. I need to know how to set up the program and what the syntax looks like. Basically I need an example of the program without the actually data that I have , so I can get an idea of how to set it up.

Uhhhhhhh, you have to write a Java program and you've never seen the language and now expect to learn everything about it from looking at a short code sample?

Start with the tutorials at java.sun.com, get some good books (Head First Java is a good one), get some OO design training.
If you're a professional you should know the paths to wander to enlightenment.

I did not say I've never seen the language. That was the first language I took when I began school. I just need some help with some of the codes for the program. I am going send you what I have and let me know whats wrong with it. The 2 subclasses are reading the information from the parent class and just need my coding to be write. I haven't dont java in 4 yrs.

abstract class BankAccount
protected int AccountNumber;
protected double Accountbalance
public abstract void updateBalance(int numb1, int numb2);

public BankAccount(int Deposit){
Deposit = AccountDeposit
withdrawal = new int[NUM_WITHDRAWAL];
Amount = "****;
}

public abstract void computeAmount();
public int getAmount (){
return Amount;
}

public int get Deposit(){
return Deposit;
}


SUB CLASS
class Savings extends BankAccount
savings(int number) {
AccountNumber = number;
savings(int balance) {
AccountBalance = balance;
public savings() {BankAccounts}
public savings(int Amount) {BankAccount(Amount) }

Account Charles = new Account();
Account Sally = new Account();
Account Cheryl = new Account();
double obtained;
System.out.println("Chales's Balance = " + charles.account_balance(150.00) );
charles.deposit(300.00);
System.out.println("Chales's Balance = " + charles.account_balance() );
obtained = charles.withdrawal(500.00);
System.out.println("Charles has withdrawn : " + obtained);
System.out.println("Chales's Balance = " + charles.account_balance() );
Sally.deposit(300.00);
obtained = Sally.withdrawn(450.00);
System.out.println("Sally's Balance = " + sally.account_balance(200.00) );


SUB CLASS
class checking extends BankAccount {
checking(int number) {
public checking() {BankAccount}
public checking(int Amount) {BankAccount(Amount) }

Account George = new Account();
Account Alice = new Account();
Account Michael = new Account();
double obtained;
System.out.println("George's Balance = " + george.account_balance(.50) );
George.deposit(50.75, 75.00);
System.out.println("George's Balance = " + george.account_balance() );
System.out.println("Alice's Balance = " + alice.account_balance(250.00) );
System.out.println("Michael's Balance = " + michael.account_balance(250.00) );

class CD extends BankAccount {
CD(int number) {
public CD() {BankAccount}
public CD(int Amount) {BankAccount(Amount) }

Account Perry = new Account();
Account Albert = new Account();
Account Carol = new Account();
double obtained;
System.out.println("Perry's Balance = " + george.account_balance(5500.00) );
George.deposit(75.00, 175.00, 350.00);
System.out.println("Albert's Balance = " + albert.account_balance(6000.00) );
obtained = Albert.withdrawn(1500.00, 500.00);
System.out.println("Albert's Balance = " + albert.account_balance() );

Hi everyone,

I see you are doing bank account programs in java.

Look at my thread at wizard solutions which i listed below that has sources about these type of programs. Check your sources against them and see where you have gone wrong

Here is the link

http://www.wizardsolutionsusa.com/forum/showthread.php?t=55

Richard West

I greatly appreciate the site that you prompted me to check out. I will check it out and see what my problems are with the program. Thanks a lot! :cheesy:

I am writing a fortran program on computing class averages, the highest grade, the lowest grade, and letter grades. The program has to assign the letter grade to the students(90-100)A, (80-89)B, (70-79)C, (60-69)D, (69 & below)F. I need to print the student who has an A and the one with the highest average.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.