• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Constructor issues with creating a new checking account object.

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys. I figured I would come here to get some help on some Java stuff. I am new to Java and taking it as part of my computer science major. I have been pretty good at it and I have learned a lot of things when it comes to Java. However I have hit a brick wall when it comes to a lab I am doing. Please be aware that these are academic exercises and I am not really looking for handouts since I do need to learn this. All I am asking for is some hints, suggestions, and some direction to the solution to the problem.

With that said here is where I am at.

I am working on a simulation of a bank with a series of checking and saving account objects to be stored in a database. I have created an ArrayList of type Account named accounts. However I am having a problem with adding a checking account object (and to a certain extent a savings account object. But once I figure this out adding a savings account object to the arraylist will be cake.) to my accounts ArrayList. At compile I am getting the following error:

Cannot find symbol - constructor Checking (java.lang.String,double,int)

I know I am on the right path but I can't seem to get past that whole constructor issue that the newChecking object is having. So that is where I am at a loss. Any thoughts and suggestions would be helpful and gratefully accepted.

Here's the code for the Bank class, Account class, and Checking class since they are related. If you want to look at the checking and savings classes let me know and I will post the code.

Bank class:


Account Class:


Checking Class:
 
author
Posts: 23907
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Johnathan Beck wrote:
Cannot find symbol - constructor Checking (java.lang.String,double,int)



Hint: Take a look at the parameters (specifically, the types) to your Checking class constructor. Do they match in how you are using it?
 
Johnathan Beck
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Henry Wong wrote:

Johnathan Beck wrote:
Cannot find symbol - constructor Checking (java.lang.String,double,int)



Hint: Take a look at the parameters (specifically, the types) to your Checking class constructor. Do they match in how you are using it?



Well after your hint I looked at the checking class constructor and found out they did not match in how I was using it. Thank you so much for your hint. Without it I probably would of been looking at it for hours. Sometimes it takes another set of eyes to see what is going on.

I will remember to keep that in mind in the future. Thank you again for your help.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic