| | |
Help me please!
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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.
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.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
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() );
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() );
•
•
Join Date: Jun 2004
Posts: 609
Reputation:
Solved Threads: 8
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/fo...hread.php?t=55
Richard West
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/fo...hread.php?t=55
Richard West
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond
Tell me what type of software do you like and what would you pay for it
http://www.daniweb.com/techtalkforums/thread19660.html
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.
![]() |
Other Threads in the Java Forum
- Previous Thread: Google & Sun Partner to tackle Microsoft
- Next Thread: help with adding items to a linked list.
| Thread Tools | Search this Thread |
Tag cloud for Java
actionlistener android api apple applet application apps arguments array arrays automation balls binary bluetooth card chat class classes client code component consumer database draw eclipse ee error event exception file fractal free game gameprogramming gis givemetehcodez graphics gui helpwithhomework html ide image input integer j2me j2seprojects java javaprojects jmf jni jpanel julia jvm linux list loop machine map method methods migrate mobile mobiledevelopmentcreatejar myaggfun netbeans newbie nextline nls notdisplaying number oracle print problem program programming project recursion recursive scanner screen security server set size sms socket sort spamblocker sql sqlite string sun swing terminal test threads time tree trolltech windows






