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.

11 Years
Discussion Span
Last Post by Shon05

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;

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) );
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() );
obtained = Sally.withdrawn(450.00);
System.out.println("Sally's Balance = " + sally.account_balance(200.00) );

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() );


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.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.