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.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Create the object of that program i'll pay for him/her

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

    Default Create the object of that program i'll pay for him/her

    Any Body telll how to create the object of that program

    public class CreditCard
    //instant variable

    private String number;
    private String name;
    private String bank;
    private double balance;
    private int limit;

    // constructor:
    CreditCard(String no, String nm,String bk,double bal,int lim)
    number = no;
    name = nm;
    bank = bk;
    balance = bal;
    limit = lim;


    //Accessor method:

    public String getNumber(){return number;}
    public String getName(){return name;}
    public String getBank(){return bank;}
    public double getBalance(){return balance;}
    public int getLimit(){return limit;}

    //Action Method:

    public boolean chargelt(double price){
    //make a charge
    if (price + balance > (double)limit)
    return false;

    // There is not enough money to charge

    return true;
    //The charge goed through in this case

    public void makePayment(double payment){
    //Make a payment

    public static void printCard(CreditCard c){
    //Print a card's Information
    System.out.println("Number = "+ c.getNumber());
    System.out.println("Name = "+ c.getName());
    System.out.println("Bank = "+ c.getBank());
    System.out.println("Balance = "+ c.getBalance());//Implicit cast
    System.out.println("Limit = "+ c.getLimit());//Implicit cast

  2. #2
    Member Hikaros's Avatar
    Join Date
    Sep 2013
    My Mood
    Thanked 2 Times in 2 Posts

    Default Re: Create the object of that program i'll pay for him/her

    *code removed*

  3. #3
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    My Mood
    Thanked 263 Times in 232 Posts

    Default Re: Create the object of that program i'll pay for him/her

  4. #4
    Join Date
    May 2013
    My Mood
    Thanked 10 Times in 10 Posts

    Default Re: Create the object of that program i'll pay for him/her

    Did the original poster just offer to pay for help on instantiating an object? That doesn't bode well for any future development as a programmer if he's paying for some pretty basic advice. I'm no expert on software development careers, but I think the idea is that you learn how to do it, then other people pay you to do programming stuff.

    Think of it this way.... objects are basically complex, custom created data types. If you wanted to create an integer variable with a name of x, and give it the value of 5, what would you do?

    Creating objects is pretty similar except the value is created using the new keyword, followed by a function call where the function is the same name as the object. Do you see what I'm getting at? I'm trying to explain without outright giving you the code. Check out the link JPS provided.

Similar Threads

  1. Create Vector of Object
    By bobbyk in forum Collections and Generics
    Replies: 3
    Last Post: March 13th, 2012, 11:20 AM
  2. Create Object
    By TitanVex in forum Object Oriented Programming
    Replies: 8
    Last Post: December 29th, 2011, 10:24 PM
  3. Program to calculate pay and total sum with daily increment. Urgent!
    By ePerKar3 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: December 5th, 2011, 12:20 PM
  4. Shopping Program Willing to pay
    By ulikecourtney in forum Paid Java Projects
    Replies: 1
    Last Post: September 27th, 2011, 12:59 PM