Saturday, May 5, 2007

Re: [completeJava] java assignement( urgent plz)

Hey Awad Saleh,

Lets use this forum to clarify doubts, learn about new and cutting edge technologies. But not to get assignments done .

But one thing, if you are struck some where while doing assignment then can ask such questions in this forum.

Good Luck,
-Naveen

awad saleh <awadan_2k@yahoo.co.in> wrote:



----- Forwarded Message ----
From: awad saleh <awadan_2k@yahoo.co.in>
To: completeJava@yahoogroups.com
Sent: Thursday, 3 May, 2007 6:29:09 PM
Subject: java assignement( urgent plz)

URGENT
Hi Everybody m sending this attachments with this mail please solve the assignmemt ..... Urgent plz

Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
import java.util.Vector;

/**
   A bank account has a balance that can be changed by
   deposits and withdrawals.
*/
public class BankAccount
{  
    String accountNumber;
    double accountBalance;
    Customer customer;
    String type;
    /**
     * @param accountNumber
     * @param accountBalance
     * @param customer
     * @param type
     */
    public BankAccount(String accountNumber, double accountBalance, Customer aCustomer, String type) {
        this.customer=aCustomer;
        this.accountNumber = accountNumber;
        this.accountBalance = accountBalance;
        this.type = type;
    }

    public BankAccount() {
        this.customer=null;
        this.accountNumber = "<UNKNOWN>";
        this.accountBalance = 0.0;
        this.type = "<UNKNOWN>";
    }
    /**
     * @return Returns the accountNumber.
     */
    public String getAccountNumber() {
        return accountNumber;
    }
    /**
     * @param accountNumber The accountNumber to set.
     */
    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
    }
    /**
     * @return Returns the customer.
     */
    public Customer getCustomer() {
        return customer;
    }
    /**
     * @param customer The customer to set.
     */
    public void setCustomer(Customer customer) {
        this.customer = customer;
    }
    /**
     * @return Returns the type.
     */
    public String getType() {
        return type;
    }
    /**
     * @param type The type to set.
     */
    public void setType(String type) {
        this.type = type;
    }
    /**
     * @param accountBalance The account Balance to set.
     */
    public void setBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }
    /**
     * @return Returns the accountBalance.
     */
    public double getBalance() {
        return accountBalance;
    }

   /**
      Deposits money into the bank account.
      @param amount the amount to deposit
   */
   public void deposit(double amount)
   {  
      double newBalance = accountBalance + amount;
      accountBalance = newBalance;
   }

   /**
      Withdraws money from the bank account.
      @param amount the amount to withdraw
   */
   public void withdraw(double amount)
   {  
      double newBalance = accountBalance - amount;
      accountBalance = newBalance;
   }


    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        // TODO Auto-generated method stub
        return accountNumber +"/"+ accountBalance+"/"+customer+"/"+ type;
    }

}
/**
* Customer - simulation of a customer with a name, address, year of birth and license Number
* @version 10/02/2006
* @author Faezeh Afshar
*/


public class Customer
    {
        private String customerId;
        private String name;
        private String address;
        private int yearOfBirth;
        
        /**
         * Customer constructor
         */
        public Customer()
            {
                name="<unknown>";
                address = "<unknown>";
                yearOfBirth=0;
                customerId= "<unknown>";
            }
        
        /**
         * Customer constructor
         */
        public Customer(String nm, String add, int year, String CId)
            {
                name=nm;
                address = add;
                yearOfBirth=year;
                customerId = CId;
            }
        
        /**
         * Get the address of the Customer
         *
         * @return String the address.
         */
        public String getAddress()
            {
                return address;
            }
        
        /**
         * Set the address of the Customer
         *
         * @param address String - the address to set.
         */
        public void setAddress(String address)
            {
                this.address = address;
            }
        
        /**
         * Get the year Of Birth of the Customer
         * @return int Returns the year Of Birth.
         */
        public int getYearOfBirth()
            {
                return yearOfBirth;
            }
        
        /**
         * Set the year Of Birth of the Customer
         *
         * @param year int - the year Of Birth to set.
         */
        public void setYearOfBirth(int year)
            {
                this.yearOfBirth = year;
            }
        
        /**
         * Get the name of the Customer
         *
         * @return String - returns the name.
         */
        public String getName()
            {
                return name;
            }
        
        /**
         * Set the name of the Customer
         *
         * @param name String the name to set.
         */
        public void setName(String name)
            {
                this.name = name;
            }

        /**
         * @return Returns the CustomerId.
         */
        public String getCustomerId()
            {
                return customerId;
            }
        
        /**
         * @param CustomerId The CustomerId to set.
         */
        public void setCustomerId(String customerId)
            {
                this.customerId = customerId;
            }
        
        /**
         * Get a String representation of the Customer
         */
        public String toString()
            {
                return name +" " + address + " " + yearOfBirth  + " " + customerId;
            }
        
  
    }
import java.util.Scanner;
/**
* Class Test - a class to allow testing of Java code involving object
*  instantiation
*
* @author <Your Student ID>
*  
*/

public class Test
{
    //Create an array and call it "accounts" to hold BankAccount objects


    /**
     * Constructor for objects of class Test
     */
    public Test()
    {
        
    }
  


    /**
     * Task 4 –  Add accounts to the BankAccount array
     */
    public void setHardCodedData () ( )
    {
        
        //Create Customer - Tom and BankAccount tomAccount and add to the Array accounts
        Customer tom = new Customer("Tom Kent","32 Dowling St",1980,"11111");
        BankAccount tomAccount= new BankAccount(987654,2000,tom,"Check");
        accounts[0]=tomAccount;
        
    }
}



Check out what you're missing if you're not on Yahoo! Messenger
import java.util.Vector;

/**
   A bank account has a balance that can be changed by
   deposits and withdrawals.
*/
public class BankAccount
{  
    String accountNumber;
    double accountBalance;
    Customer customer;
    String type;
    /**
     * @param accountNumber
     * @param accountBalance
     * @param customer
     * @param type
     */
    public BankAccount(String accountNumber, double accountBalance, Customer aCustomer, String type) {
        this.customer=aCustomer;
        this.accountNumber = accountNumber;
        this.accountBalance = accountBalance;
        this.type = type;
    }

    public BankAccount() {
        this.customer=null;
        this.accountNumber = "<UNKNOWN>";
        this.accountBalance = 0.0;
        this.type = "<UNKNOWN>";
    }
    /**
     * @return Returns the accountNumber.
     */
    public String getAccountNumber() {
        return accountNumber;
    }
    /**
     * @param accountNumber The accountNumber to set.
     */
    public void setAccountNumber(String accountNumber) {
        this.accountNumber = accountNumber;
    }
    /**
     * @return Returns the customer.
     */
    public Customer getCustomer() {
        return customer;
    }
    /**
     * @param customer The customer to set.
     */
    public void setCustomer(Customer customer) {
        this.customer = customer;
    }
    /**
     * @return Returns the type.
     */
    public String getType() {
        return type;
    }
    /**
     * @param type The type to set.
     */
    public void setType(String type) {
        this.type = type;
    }
    /**
     * @param accountBalance The account Balance to set.
     */
    public void setBalance(double accountBalance) {
        this.accountBalance = accountBalance;
    }
    /**
     * @return Returns the accountBalance.
     */
    public double getBalance() {
        return accountBalance;
    }

   /**
      Deposits money into the bank account.
      @param amount the amount to deposit
   */
   public void deposit(double amount)
   {  
      double newBalance = accountBalance + amount;
      accountBalance = newBalance;
   }

   /**
      Withdraws money from the bank account.
      @param amount the amount to withdraw
   */
   public void withdraw(double amount)
   {  
      double newBalance = accountBalance - amount;
      accountBalance = newBalance;
   }


    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        // TODO Auto-generated method stub
        return accountNumber +"/"+ accountBalance+"/"+customer+"/"+ type;
    }

}
/**
* Customer - simulation of a customer with a name, address, year of birth and license Number
* @version 10/02/2006
* @author Faezeh Afshar
*/


public class Customer
    {
        private String customerId;
        private String name;
        private String address;
        private int yearOfBirth;
        
        /**
         * Customer constructor
         */
        public Customer()
            {
                name="<unknown>";
                address = "<unknown>";
                yearOfBirth=0;
                customerId= "<unknown>";
            }
        
        /**
         * Customer constructor
         */
        public Customer(String nm, String add, int year, String CId)
            {
                name=nm;
                address = add;
                yearOfBirth=year;
                customerId = CId;
            }
        
        /**
         * Get the address of the Customer
         *
         * @return String the address.
         */
        public String getAddress()
            {
                return address;
            }
        
        /**
         * Set the address of the Customer
         *
         * @param address String - the address to set.
         */
        public void setAddress(String address)
            {
                this.address = address;
            }
        
        /**
         * Get the year Of Birth of the Customer
         * @return int Returns the year Of Birth.
         */
        public int getYearOfBirth()
            {
                return yearOfBirth;
            }
        
        /**
         * Set the year Of Birth of the Customer
         *
         * @param year int - the year Of Birth to set.
         */
        public void setYearOfBirth(int year)
            {
                this.yearOfBirth = year;
            }
        
        /**
         * Get the name of the Customer
         *
         * @return String - returns the name.
         */
        public String getName()
            {
                return name;
            }
        
        /**
         * Set the name of the Customer
         *
         * @param name String the name to set.
         */
        public void setName(String name)
            {
                this.name = name;
            }

        /**
         * @return Returns the CustomerId.
         */
        public String getCustomerId()
            {
                return customerId;
            }
        
        /**
         * @param CustomerId The CustomerId to set.
         */
        public void setCustomerId(String customerId)
            {
                this.customerId = customerId;
            }
        
        /**
         * Get a String representation of the Customer
         */
        public String toString()
            {
                return name +" " + address + " " + yearOfBirth  + " " + customerId;
            }
        
  
    }
import java.util.Scanner;
/**
* Class Test - a class to allow testing of Java code involving object
*  instantiation
*
* @author <Your Student ID>
*  
*/

public class Test
{
    //Create an array and call it "accounts" to hold BankAccount objects


    /**
     * Constructor for objects of class Test
     */
    public Test()
    {
        
    }
  


    /**
     * Task 4 –  Add accounts to the BankAccount array
     */
    public void setHardCodedData () ( )
    {
        
        //Create Customer - Tom and BankAccount tomAccount and add to the Array accounts
        Customer tom = new Customer("Tom Kent","32 Dowling St",1980,"11111");
        BankAccount tomAccount= new BankAccount(987654,2000,tom,"Check");
        accounts[0]=tomAccount;
        
    }
}



Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? Here's a solution!
import java.util.Vector;

/**
A bank account has a balance that can be changed by
deposits and withdrawals.
*/
public class BankAccount
{
String accountNumber;
double accountBalance;
Customer customer;
String type;
/**
* @param accountNumber
* @param accountBalance
* @param customer
* @param type
*/
public BankAccount(String accountNumber, double accountBalance, Customer aCustomer, String type) {
this.customer=aCustomer;
this.accountNumber = accountNumber;
this.accountBalance = accountBalance;
this.type = type;
}

public BankAccount() {
this.customer=null;
this.accountNumber = "";
this.accountBalance = 0.0;
this.type = "";
}
/**
* @return Returns the accountNumber.
*/
public String getAccountNumber() {
return accountNumber;
}
/**
* @param accountNumber The accountNumber to set.
*/
public void setAccountNumber(String accountNumber) {
this.accountNumber = accountNumber;
}
/**
* @return Returns the customer.
*/
public Customer getCustomer() {
return customer;
}
/**
* @param customer The customer to set.
*/
public void setCustomer(Customer customer) {
this.customer = customer;
}
/**
* @return Returns the type.
*/
public String getType() {
return type;
}
/**
* @param type The type to set.
*/
public void setType(String type) {
this.type = type;
}
/**
* @param accountBalance The account Balance to set.
*/
public void setBalance(double accountBalance) {
this.accountBalance = accountBalance;
}
/**
* @return Returns the accountBalance.
*/
public double getBalance() {
return accountBalance;
}

/**
Deposits money into the bank account.
@param amount the amount to deposit
*/
public void deposit(double amount)
{
double newBalance = accountBalance + amount;
accountBalance = newBalance;
}

/**
Withdraws money from the bank account.
@param amount the amount to withdraw
*/
public void withdraw(double amount)
{
double newBalance = accountBalance - amount;
accountBalance = newBalance;
}


/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
// TODO Auto-generated method stub
return accountNumber +"/"+ accountBalance+"/"+customer+"/"+ type;
}

}
/**
* Customer - simulation of a customer with a name, address, year of birth and license Number
* @version 10/02/2006
* @author Faezeh Afshar
*/


public class Customer
{
private String customerId;
private String name;
private String address;
private int yearOfBirth;

/**
* Customer constructor
*/
public Customer()
{
name="";
address = "";
yearOfBirth=0;
customerId= "";
}

/**
* Customer constructor
*/
public Customer(String nm, String add, int year, String CId)
{
name=nm;
address = add;
yearOfBirth=year;
customerId = CId;
}

/**
* Get the address of the Customer
*
* @return String the address.
*/
public String getAddress()
{
return address;
}

/**
* Set the address of the Customer
*
* @param address String - the address to set.
*/
public void setAddress(String address)
{
this.address = address;
}

/**
* Get the year Of Birth of the Customer
* @return int Returns the year Of Birth.
*/
public int getYearOfBirth()
{
return yearOfBirth;
}

/**
* Set the year Of Birth of the Customer
*
* @param year int - the year Of Birth to set.
*/
public void setYearOfBirth(int year)
{
this.yearOfBirth = year;
}

/**
* Get the name of the Customer
*
* @return String - returns the name.
*/
public String getName()
{
return name;
}

/**
* Set the name of the Customer
*
* @param name String the name to set.
*/
public void setName(String name)
{
this.name = name;
}

/**
* @return Returns the CustomerId.
*/
public String getCustomerId()
{
return customerId;
}

/**
* @param CustomerId The CustomerId to set.
*/
public void setCustomerId(String customerId)
{
this.customerId = customerId;
}

/**
* Get a String representation of the Customer
*/
public String toString()
{
return name +" " + address + " " + yearOfBirth + " " + customerId;
}


}
import java.util.Scanner;
/**
* Class Test - a class to allow testing of Java code involving object
* instantiation
*
* @author
*
*/

public class Test
{
//Create an array and call it "accounts" to hold BankAccount objects


/**
* Constructor for objects of class Test
*/
public Test()
{

}



/**
* Task 4 – Add accounts to the BankAccount array
*/
public void setHardCodedData () ( )
{

//Create Customer - Tom and BankAccount tomAccount and add to the Array accounts
Customer tom = new Customer("Tom Kent","32 Dowling St",1980,"11111");
BankAccount tomAccount= new BankAccount(987654,2000,tom,"Check");
accounts[0]=tomAccount;

}
}



______________________________________________________________________________________
"Though we cannot rewrite the past, we should write a better future"
M Naveen Kumar Reddy
+1 248-227-2293 (Edison, NJ)


Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.

__._,_.___
Recent Activity
Visit Your Group
SPONSORED LINKS
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

New business?

Get new customers.

List your web site

in Yahoo! Search.

Yahoo! Groups

Start a group

in 3 easy steps.

Connect with others.

.

__,_._,___

No comments: