Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

exception in thread 2

Posted on 2006-06-19
3
Medium Priority
?
253 Views
Last Modified: 2010-03-31
is there something Im missing here to get excption in thread? these 2 programs have the same prob..
prog1:import java.util.*;
public class AuditedCard extends CreditCard implements CardInterface {
  protected Vector transacts; // to keep transactions

      private String num;
      private String name;
      private String bank;
      private double balance;
      private int limit;
      private String type;
      private double amount;
      ArrayList transList;
      
      
      public AuditedCard(String numb1, String name1, String bank1, double balance1, int limit1) {
            super (numb1,name1,bank1,balance1,limit1);
            
            num = numb1;
            name = name1;
            bank = bank1;
            balance = balance1;
            limit = limit1;                  
            
            transList = new ArrayList();
                                          
      }
      public boolean chargeIt(double price) {       // Make a charge
    if (price + balance > (double) limit)
      return false;      // Not enough money left to charge it
    balance += price;
    return true;      // The charge is accepted
   
  }
      public void recordTrans(String ty, double amt){
      
      }
      
      public double getBalance(){
            return balance;
      }
            
      
      public void print(){
      //printing all e results
          
      }
}
      
prog 2:public interface CardInterface {
 
  // Accessor methods
  public String getNumber();
  public String getName();
  public String getBank();
  public double getBalance();
  public int getLimit();
 
  // Action methods
  public boolean chargeIt(double price);
  public void makePayment(double payment);
  public void print();
}

0
Comment
Question by:basgen
  • 2
3 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 16933390
I think this is a similar question to a previous one, please post here if you also think so: http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_21890971.html
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 2000 total points
ID: 16933567
Yes, its perhaps a duplicate.
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16941162
Pls delete duplicate Q's instead of accepting.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question