• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Need help with a small Java project

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I'm doing a bank account project and I have a problem ...
I would like the result of the output of my program to give me something like this:


The classes wich I may have to modify are the following :





When I execute I dont get any errors I just dont get anything I think I should add something in my transacList I just dont know what...

Thank you for your time and I appreciate any help.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

Here are a couple tips to make your experience here more productive and ensure you get the best help possible.

1) You didn't tell us what it's doing instead. Please TellTheDetails.

2) That's way too much code. We don't need to see your whole program. Provide just enough to show the specific problem you're asking about, and nothing else. Often times this means writing a completely separate, smaller program--an SSCCE.

EDIT: Okay, I see you've updated your post. That looks better. So, when you say you "don't get anything", you mean there's no output at all? What output do you expect?
 
Yann Danis
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeff Verdegan wrote:
So, when you say you "don't get anything", you mean there's no output at all? What output do you expect?



The output I would like to have when my project is done is what I have posted before posting my classes but for now I'd like anything at least so I can try and work on something... xD
 
Ranch Hand
Posts: 164
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's never good idea to post that much code unless you are sure it's all relevant to the problem you are having. It is also preferred that you write your code in english because when someone starts to read someone elses code he looks at variable and method names to understand it faster, in your case you have written your code in french if I'm not mistaken which makes it more difficult to read for someone that doesn't know french (me for instance).
 
Unnar Björnsson
Ranch Hand
Posts: 164
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are having output problems the simplest way to debug it is to output some extra debug text at appropriate places in your code to narrow the possible cause. I'd check if that for loop at line:95 is being executed as it should. In other words, work you way backwards until you find the source of the problem.
 
Yann Danis
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think I have to modify something in the class Compte so that each depot, retrait or transfer create an occurrence of the class Transaction wich will be save in the ArrayList named transacList inside the object compte I just dont know how to do it...

If you need me to put my code in english so that you can help me I will...
 
Unnar Björnsson
Ranch Hand
Posts: 164
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The reason you are not getting any output is that transacList is empty. What is missing is adding a new Transaction object to that list when deposit, withdrawal or transfer is made on the account.
 
Yann Danis
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks peaple I finally got this on the run. ;)
 
Marshal
Posts: 74387
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you have a static class inside the enum?
 
Yann Danis
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Why do you have a static class inside the enum?


nvm that I fix that project
 
Campbell Ritchie
Marshal
Posts: 74387
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Yann Danis wrote: . . . nvm that I fix that project

What on earth does that mean? Please avoid abbreviations like nvm.
 
Yann Danis
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Yann Danis wrote: . . . nvm that I fix that project

What on earth does that mean? Please avoid abbreviations like nvm.



Sorry about that when your used to it you dont think about the fact that its not everyone that understands.

nvm = never mind xD
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic